Alexandre Julliard : user32: Fix refcounting of window DCEs.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon May 23 10:27:44 CDT 2016
Module: wine
Branch: master
Commit: 5f7e4ce642d4deb615e09a3411dc7f416e7e4c22
URL: http://source.winehq.org/git/wine.git/?a=commit;h=5f7e4ce642d4deb615e09a3411dc7f416e7e4c22
Author: Alexandre Julliard <julliard at winehq.org>
Date: Sat May 21 09:54:01 2016 +0900
user32: Fix refcounting of window DCEs.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/user32/painting.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/dlls/user32/painting.c b/dlls/user32/painting.c
index 9e5bc0a..c0c92d8 100644
--- a/dlls/user32/painting.c
+++ b/dlls/user32/painting.c
@@ -311,7 +311,6 @@ static struct dce *get_window_dce( HWND hwnd )
{
win->dce = dce;
dce->hwnd = hwnd;
- dce->count++;
list_add_tail( &dce_list, &dce->entry );
}
WIN_ReleasePtr( win );
@@ -501,14 +500,10 @@ static BOOL CALLBACK dc_hook( HDC hDC, WORD code, DWORD_PTR data, LPARAM lParam
WARN("DC is not in use!\n");
break;
case DCHC_DELETEDC:
- /*
- * Windows will not let you delete a DC that is busy
- * (between GetDC and ReleaseDC)
- */
USER_Lock();
- if (dce->count > 1)
+ if (!(dce->flags & DCX_CACHE))
{
- WARN("Application trying to delete a busy DC %p\n", dce->hdc);
+ WARN("Application trying to delete an owned DC %p\n", dce->hdc);
retv = FALSE;
}
else
More information about the wine-cvs
mailing list