Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
d78a5829
Commit
d78a5829
authored
Sep 27, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Don't hold the GDI lock while calling the driver SelectFont function.
parent
e9f1638d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
font.c
dlls/gdi32/font.c
+15
-3
No files found.
dlls/gdi32/font.c
View file @
d78a5829
...
...
@@ -588,14 +588,24 @@ HFONT WINAPI CreateFontW( INT height, INT width, INT esc,
static
HGDIOBJ
FONT_SelectObject
(
HGDIOBJ
handle
,
HDC
hdc
)
{
HGDIOBJ
ret
=
0
;
DC
*
dc
=
DC_GetDCP
tr
(
hdc
);
DC
*
dc
=
get_dc_p
tr
(
hdc
);
if
(
!
dc
)
return
0
;
if
(
!
GDI_inc_ref_count
(
handle
))
{
release_dc_ptr
(
dc
);
return
0
;
}
if
(
dc
->
hFont
!=
handle
||
dc
->
gdiFont
==
NULL
)
{
if
(
GetDeviceCaps
(
dc
->
hSelf
,
TEXTCAPS
)
&
TC_VA_ABLE
)
{
FONTOBJ
*
font
=
GDI_GetObjPtr
(
handle
,
FONT_MAGIC
);
/* to grab the GDI lock (FIXME) */
dc
->
gdiFont
=
WineEngCreateFontInstance
(
dc
,
handle
);
if
(
font
)
GDI_ReleaseObj
(
handle
);
}
}
if
(
dc
->
funcs
->
pSelectFont
)
ret
=
dc
->
funcs
->
pSelectFont
(
dc
->
physDev
,
handle
,
dc
->
gdiFont
);
...
...
@@ -603,15 +613,17 @@ static HGDIOBJ FONT_SelectObject( HGDIOBJ handle, HDC hdc )
if
(
ret
&&
dc
->
gdiFont
)
dc
->
gdiFont
=
0
;
if
(
ret
==
HGDI_ERROR
)
{
GDI_dec_ref_count
(
handle
);
ret
=
0
;
/* SelectObject returns 0 on error */
}
else
{
ret
=
dc
->
hFont
;
dc
->
hFont
=
handle
;
GDI_inc_ref_count
(
handle
);
GDI_dec_ref_count
(
ret
);
}
DC_ReleaseDCP
tr
(
dc
);
release_dc_p
tr
(
dc
);
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