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
a60144ee
Commit
a60144ee
authored
Jan 26, 2017
by
Huw Davies
Committed by
Alexandre Julliard
Jan 26, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Disable cached DCs once they are released.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0805b0d5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
+12
-5
painting.c
dlls/user32/painting.c
+10
-3
dce.c
dlls/user32/tests/dce.c
+2
-2
No files found.
dlls/user32/painting.c
View file @
a60144ee
...
...
@@ -476,7 +476,11 @@ static INT release_dc( HWND hwnd, HDC hdc, BOOL end_paint )
{
if
(
!
(
dce
->
flags
&
DCX_NORESETATTRS
))
SetHookFlags
(
dce
->
hdc
,
DCHF_RESETDC
);
if
(
end_paint
||
(
dce
->
flags
&
DCX_CACHE
))
delete_clip_rgn
(
dce
);
if
(
dce
->
flags
&
DCX_CACHE
)
dce
->
count
=
0
;
if
(
dce
->
flags
&
DCX_CACHE
)
{
dce
->
count
=
0
;
SetHookFlags
(
dce
->
hdc
,
DCHF_DISABLEDC
);
}
ret
=
TRUE
;
}
USER_Unlock
();
...
...
@@ -1007,8 +1011,11 @@ HDC WINAPI GetDCEx( HWND hwnd, HRGN hrgnClip, DWORD flags )
if
(
!
found
&&
count
>=
DCE_CACHE_SIZE
)
found
=
dceUnused
;
dce
=
found
;
if
(
dce
)
dce
->
count
=
1
;
if
(
dce
)
{
dce
->
count
=
1
;
SetHookFlags
(
dce
->
hdc
,
DCHF_ENABLEDC
);
}
USER_Unlock
();
/* if there's no dce empty or unused, allocate a new one */
...
...
dlls/user32/tests/dce.c
View file @
a60144ee
...
...
@@ -112,9 +112,9 @@ static void test_dc_attributes(void)
/* Released cache DCs are 'disabled' */
rop
=
SetROP2
(
old_hdc
,
R2_BLACK
);
todo_wine
ok
(
rop
==
0
,
"got %d
\n
"
,
rop
);
ok
(
rop
==
0
,
"got %d
\n
"
,
rop
);
rop
=
GetROP2
(
old_hdc
);
todo_wine
ok
(
rop
==
0
,
"got %d
\n
"
,
rop
);
ok
(
rop
==
0
,
"got %d
\n
"
,
rop
);
/* test own DC */
...
...
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