Alexandre Julliard : user32: Make sure the system params DC cannot be deleted.

Alexandre Julliard julliard at winehq.org
Tue May 5 09:12:54 CDT 2009


Module: wine
Branch: master
Commit: 1fa15f3d2f4434888cc6a6075b089e4f0feff349
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=1fa15f3d2f4434888cc6a6075b089e4f0feff349

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue May  5 15:36:44 2009 +0200

user32: Make sure the system params DC cannot be deleted.

---

 dlls/user32/sysparams.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/dlls/user32/sysparams.c b/dlls/user32/sysparams.c
index 82940e4..0563271 100644
--- a/dlls/user32/sysparams.c
+++ b/dlls/user32/sysparams.c
@@ -710,7 +710,11 @@ static inline HDC get_display_dc(void)
 {
     static const WCHAR DISPLAY[] = {'D','I','S','P','L','A','Y',0};
     static HDC display_dc;
-    if (!display_dc) display_dc = CreateICW( DISPLAY, NULL, NULL, NULL );
+    if (!display_dc)
+    {
+        display_dc = CreateICW( DISPLAY, NULL, NULL, NULL );
+        __wine_make_gdi_object_system( display_dc, TRUE );
+    }
     return display_dc;
 }
 




More information about the wine-cvs mailing list