[WIN32K]
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Wed, 23 Feb 2011 19:10:42 +0000 (19:10 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Wed, 23 Feb 2011 19:10:42 +0000 (19:10 +0000)
Patch by Rafał Harabień :
- Create a new region covering the full desktop in UserRedrawDesktop instead of using Window->hrgnUpdate. Fixes "IntGdiCombineRgn requires hSrc2  != NULL" messages and redrawing issues on mode change.
See issue #5949 for more details.

svn path=/trunk/; revision=50881

reactos/subsystems/win32/win32k/ntuser/desktop.c
reactos/subsystems/win32/win32k/ntuser/painting.c

index b0b3c7c..1653bc2 100644 (file)
@@ -616,15 +616,19 @@ VOID APIENTRY
 UserRedrawDesktop()
 {
     PWND Window = NULL;
-
+    HRGN hRgn;
+    
     Window = UserGetDesktopWindow();
+    hRgn = IntSysCreateRectRgnIndirect(&Window->rcWindow);
 
     IntInvalidateWindows( Window,
-              Window->hrgnUpdate,
+                            hRgn,
                        RDW_FRAME |
                        RDW_ERASE |
                   RDW_INVALIDATE |
                  RDW_ALLCHILDREN);
+    
+    REGION_FreeRgnByHandle(hRgn);
 }
 
 
index c9bc314..e746391 100644 (file)
@@ -307,9 +307,9 @@ co_IntPaintWindows(PWND Wnd, ULONG Flags, BOOL Recurse)
 /*
  * IntInvalidateWindows
  *
- * Internal function used by IntRedrawWindow.
+ * Internal function used by IntRedrawWindow, UserRedrawDesktop, 
+ * co_WinPosSetWindowPos, IntValidateParent, co_UserRedrawWindow.
  */
-
 VOID FASTCALL
 IntInvalidateWindows(PWND Wnd, HRGN hRgn, ULONG Flags)
 {