[NtUser]
authorJames Tabor <james.tabor@reactos.org>
Wed, 31 Aug 2016 20:38:09 +0000 (20:38 +0000)
committerJames Tabor <james.tabor@reactos.org>
Wed, 31 Aug 2016 20:38:09 +0000 (20:38 +0000)
- Fixed one of the msg:msg_paint:test_paint_messages while looking for another issue. See CORE-7166.

svn path=/trunk/; revision=72523

reactos/win32ss/user/ntuser/painting.c
reactos/win32ss/user/ntuser/painting.h
reactos/win32ss/user/ntuser/winpos.c

index 4e124f3..ee6dc18 100644 (file)
@@ -9,9 +9,6 @@
 #include <win32k.h>
 DBG_DEFAULT_CHANNEL(UserPainting);
 
-#define RDW_CLIPCHILDREN  4096
-#define RDW_NOUPDATEDIRTY 32768
-
 /* PRIVATE FUNCTIONS **********************************************************/
 
 /**
index e1ceb21..5c8ef72 100644 (file)
@@ -12,6 +12,9 @@
 #define PRGN_WINDOW  ((PREGION)1) /* region from window rcWindow */
 #define PRGN_MONITOR ((PREGION)2) /* region from monitor region. */
 
+#define RDW_CLIPCHILDREN  4096
+#define RDW_NOUPDATEDIRTY 32768
+
 #define GreCreateRectRgnIndirect(prc) \
   NtGdiCreateRectRgn((prc)->left, (prc)->top, (prc)->right, (prc)->bottom)
 
@@ -36,4 +39,4 @@ BOOL FASTCALL IntIntersectWithParents(PWND, RECTL *);
 BOOL FASTCALL IntIsWindowDrawable(PWND);
 BOOL UserDrawCaption(PWND,HDC,RECTL*,HFONT,HICON,const PUNICODE_STRING,UINT);
 VOID FASTCALL UpdateThreadWindows(PWND,PTHREADINFO,HRGN);
-
+VOID FASTCALL UserSyncAndPaintWindows(PWND pWnd, ULONG Flags);
index 43ba876..25004d7 100644 (file)
@@ -2241,6 +2241,19 @@ co_WinPosSetWindowPos(
 #endif
    }
 
+   if ( !PosChanged &&
+         (WinPos.flags & SWP_FRAMECHANGED) &&
+        !(WinPos.flags & SWP_DEFERERASE) &&    // Prevent sending WM_SYNCPAINT message. 
+         VisAfter )
+   {
+       PWND Parent = Window->spwndParent;
+       if ( !(Window->style & WS_CHILD) && (Parent) && (Parent->style & WS_CLIPCHILDREN))
+       {
+           TRACE("SWP_FRAMECHANGED Parent WS_CLIPCHILDREN\n");
+           UserSyncAndPaintWindows( Parent, RDW_CLIPCHILDREN);
+       }
+   }
+
    // Fix wine msg test_SetFocus, prevents sending WM_WINDOWPOSCHANGED.
    if ( VisBefore == NULL &&
         VisBeforeJustClient == NULL &&
@@ -3396,7 +3409,7 @@ NtUserSetWindowRgn(
    }
    else
    {
-       Window->hrgnNewFrame = (HRGN) 1;
+       Window->hrgnNewFrame = HRGN_WINDOW;
    }
    //// HACK 2
    Ret = co_WinPosSetWindowPos(Window, HWND_TOP, 0, 0, 0, 0, bRedraw ? flags : (flags|SWP_NOREDRAW) );