Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
4227bf4a
Commit
4227bf4a
authored
Jun 28, 2002
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BITMAP_SelectObject must return the old handle, not the current one.
parent
bb05bb62
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
bitmap.c
objects/bitmap.c
+7
-4
No files found.
objects/bitmap.c
View file @
4227bf4a
...
@@ -470,7 +470,7 @@ BOOL BITMAP_SetOwnerDC( HBITMAP hbitmap, DC *dc )
...
@@ -470,7 +470,7 @@ BOOL BITMAP_SetOwnerDC( HBITMAP hbitmap, DC *dc )
*/
*/
static
HGDIOBJ
BITMAP_SelectObject
(
HGDIOBJ
handle
,
void
*
obj
,
HDC
hdc
)
static
HGDIOBJ
BITMAP_SelectObject
(
HGDIOBJ
handle
,
void
*
obj
,
HDC
hdc
)
{
{
HGDIOBJ
ret
=
handle
;
HGDIOBJ
ret
;
BITMAPOBJ
*
bitmap
=
obj
;
BITMAPOBJ
*
bitmap
=
obj
;
DC
*
dc
=
DC_GetDCPtr
(
hdc
);
DC
*
dc
=
DC_GetDCPtr
(
hdc
);
...
@@ -480,6 +480,7 @@ static HGDIOBJ BITMAP_SelectObject( HGDIOBJ handle, void *obj, HDC hdc )
...
@@ -480,6 +480,7 @@ static HGDIOBJ BITMAP_SelectObject( HGDIOBJ handle, void *obj, HDC hdc )
GDI_ReleaseObj
(
hdc
);
GDI_ReleaseObj
(
hdc
);
return
0
;
return
0
;
}
}
ret
=
dc
->
hBitmap
;
if
(
handle
==
dc
->
hBitmap
)
goto
done
;
/* nothing to do */
if
(
handle
==
dc
->
hBitmap
)
goto
done
;
/* nothing to do */
if
(
bitmap
->
header
.
dwCount
&&
(
handle
!=
GetStockObject
(
DEFAULT_BITMAP
)))
if
(
bitmap
->
header
.
dwCount
&&
(
handle
!=
GetStockObject
(
DEFAULT_BITMAP
)))
...
@@ -495,11 +496,11 @@ static HGDIOBJ BITMAP_SelectObject( HGDIOBJ handle, void *obj, HDC hdc )
...
@@ -495,11 +496,11 @@ static HGDIOBJ BITMAP_SelectObject( HGDIOBJ handle, void *obj, HDC hdc )
return
0
;
return
0
;
}
}
if
(
dc
->
funcs
->
pSelectBitmap
)
ret
=
dc
->
funcs
->
pSelectBitmap
(
dc
->
physDev
,
handle
);
if
(
dc
->
funcs
->
pSelectBitmap
)
handle
=
dc
->
funcs
->
pSelectBitmap
(
dc
->
physDev
,
handle
);
if
(
ret
)
if
(
handle
)
{
{
dc
->
hBitmap
=
ret
;
dc
->
hBitmap
=
handle
;
dc
->
totalExtent
.
left
=
0
;
dc
->
totalExtent
.
left
=
0
;
dc
->
totalExtent
.
top
=
0
;
dc
->
totalExtent
.
top
=
0
;
dc
->
totalExtent
.
right
=
bitmap
->
bitmap
.
bmWidth
;
dc
->
totalExtent
.
right
=
bitmap
->
bitmap
.
bmWidth
;
...
@@ -515,6 +516,8 @@ static HGDIOBJ BITMAP_SelectObject( HGDIOBJ handle, void *obj, HDC hdc )
...
@@ -515,6 +516,8 @@ static HGDIOBJ BITMAP_SelectObject( HGDIOBJ handle, void *obj, HDC hdc )
DC_InitDC
(
dc
);
DC_InitDC
(
dc
);
}
}
}
}
else
ret
=
0
;
done:
done:
GDI_ReleaseObj
(
hdc
);
GDI_ReleaseObj
(
hdc
);
return
ret
;
return
ret
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment