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
630c976f
Commit
630c976f
authored
Feb 05, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Don't hold the GDI lock when calling DC_InitDC.
parent
67a9edbd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
11 deletions
+16
-11
bitmap.c
dlls/gdi32/bitmap.c
+16
-11
No files found.
dlls/gdi32/bitmap.c
View file @
630c976f
...
@@ -576,13 +576,8 @@ static HGDIOBJ BITMAP_SelectObject( HGDIOBJ handle, HDC hdc )
...
@@ -576,13 +576,8 @@ static HGDIOBJ BITMAP_SelectObject( HGDIOBJ handle, HDC hdc )
BITMAPOBJ
*
bitmap
;
BITMAPOBJ
*
bitmap
;
DC
*
dc
;
DC
*
dc
;
if
(
!
(
bitmap
=
GDI_GetObjPtr
(
handle
,
BITMAP_MAGIC
)))
return
0
;
if
(
!
(
dc
=
get_dc_ptr
(
hdc
)))
return
0
;
if
(
!
(
dc
=
get_dc_ptr
(
hdc
)))
{
GDI_ReleaseObj
(
handle
);
return
0
;
}
if
(
GetObjectType
(
hdc
)
!=
OBJ_MEMDC
)
if
(
GetObjectType
(
hdc
)
!=
OBJ_MEMDC
)
{
{
ret
=
0
;
ret
=
0
;
...
@@ -591,34 +586,44 @@ static HGDIOBJ BITMAP_SelectObject( HGDIOBJ handle, HDC hdc )
...
@@ -591,34 +586,44 @@ static HGDIOBJ BITMAP_SelectObject( HGDIOBJ handle, HDC hdc )
ret
=
dc
->
hBitmap
;
ret
=
dc
->
hBitmap
;
if
(
handle
==
dc
->
hBitmap
)
goto
done
;
/* nothing to do */
if
(
handle
==
dc
->
hBitmap
)
goto
done
;
/* nothing to do */
if
(
!
(
bitmap
=
GDI_GetObjPtr
(
handle
,
BITMAP_MAGIC
)))
{
ret
=
0
;
goto
done
;
}
if
(
bitmap
->
header
.
dwCount
&&
(
handle
!=
GetStockObject
(
DEFAULT_BITMAP
)))
if
(
bitmap
->
header
.
dwCount
&&
(
handle
!=
GetStockObject
(
DEFAULT_BITMAP
)))
{
{
WARN
(
"Bitmap already selected in another DC
\n
"
);
WARN
(
"Bitmap already selected in another DC
\n
"
);
GDI_ReleaseObj
(
handle
);
ret
=
0
;
ret
=
0
;
goto
done
;
goto
done
;
}
}
if
(
!
bitmap
->
funcs
&&
!
BITMAP_SetOwnerDC
(
handle
,
dc
))
if
(
!
bitmap
->
funcs
&&
!
BITMAP_SetOwnerDC
(
handle
,
dc
))
{
{
GDI_ReleaseObj
(
handle
);
ret
=
0
;
ret
=
0
;
goto
done
;
goto
done
;
}
}
if
(
dc
->
funcs
->
pSelectBitmap
)
handle
=
dc
->
funcs
->
pSelectBitmap
(
dc
->
physDev
,
handle
);
if
(
dc
->
funcs
->
pSelectBitmap
&&
!
dc
->
funcs
->
pSelectBitmap
(
dc
->
physDev
,
handle
))
{
if
(
handle
)
GDI_ReleaseObj
(
handle
);
ret
=
0
;
}
else
{
{
dc
->
hBitmap
=
handle
;
dc
->
hBitmap
=
handle
;
GDI_inc_ref_count
(
handle
);
GDI_inc_ref_count
(
handle
);
dc
->
dirty
=
0
;
dc
->
dirty
=
0
;
SetRectRgn
(
dc
->
hVisRgn
,
0
,
0
,
bitmap
->
bitmap
.
bmWidth
,
bitmap
->
bitmap
.
bmHeight
);
SetRectRgn
(
dc
->
hVisRgn
,
0
,
0
,
bitmap
->
bitmap
.
bmWidth
,
bitmap
->
bitmap
.
bmHeight
);
GDI_ReleaseObj
(
handle
);
DC_InitDC
(
dc
);
DC_InitDC
(
dc
);
GDI_dec_ref_count
(
ret
);
GDI_dec_ref_count
(
ret
);
}
}
else
ret
=
0
;
done:
done:
GDI_ReleaseObj
(
handle
);
release_dc_ptr
(
dc
);
release_dc_ptr
(
dc
);
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