diff --git a/reactos/win32ss/user/ntuser/painting.c b/reactos/win32ss/user/ntuser/painting.c index 4e124f36e56..ee6dc188fe5 100644 --- a/reactos/win32ss/user/ntuser/painting.c +++ b/reactos/win32ss/user/ntuser/painting.c @@ -9,9 +9,6 @@ #include DBG_DEFAULT_CHANNEL(UserPainting); -#define RDW_CLIPCHILDREN 4096 -#define RDW_NOUPDATEDIRTY 32768 - /* PRIVATE FUNCTIONS **********************************************************/ /** diff --git a/reactos/win32ss/user/ntuser/painting.h b/reactos/win32ss/user/ntuser/painting.h index e1ceb21f860..5c8ef722830 100644 --- a/reactos/win32ss/user/ntuser/painting.h +++ b/reactos/win32ss/user/ntuser/painting.h @@ -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); diff --git a/reactos/win32ss/user/ntuser/winpos.c b/reactos/win32ss/user/ntuser/winpos.c index 43ba8767803..25004d7541b 100644 --- a/reactos/win32ss/user/ntuser/winpos.c +++ b/reactos/win32ss/user/ntuser/winpos.c @@ -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) );