https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8081ba93321e04916f854…
commit 8081ba93321e04916f854ba85f3ab512254c1b04
Author: Doug Lyons <douglyons(a)douglyons.com>
AuthorDate: Sat Oct 24 14:35:45 2020 -0500
Commit: GitHub <noreply(a)github.com>
CommitDate: Sat Oct 24 22:35:45 2020 +0300
[WIN32SS] Repaint the whole window frame on some style bits set (#3199)
This fixes the ReactOS Calculator buttons disappearing in CORE-16827
---
win32ss/user/ntuser/winpos.c | 26 +++++++++++++++++++-------
1 file changed, 19 insertions(+), 7 deletions(-)
diff --git a/win32ss/user/ntuser/winpos.c b/win32ss/user/ntuser/winpos.c
index 9a74a16e45b..bbe6ac5f904 100644
--- a/win32ss/user/ntuser/winpos.c
+++ b/win32ss/user/ntuser/winpos.c
@@ -2112,13 +2112,25 @@ co_WinPosSetWindowPos(
if ( !(pwnd->style & WS_CHILD) )
{
- HRGN DcRgn = NtGdiCreateRectRgn(0, 0, 0, 0);
- PREGION DcRgnObj = REGION_LockRgn(DcRgn);
- TRACE("SWP_FRAMECHANGED win %p hRgn %p\n",pwnd,
DcRgn);
- IntGdiCombineRgn(DcRgnObj, VisBefore, NULL, RGN_COPY);
- REGION_UnlockRgn(DcRgnObj);
- ForceNCPaintErase(pwnd, DcRgn, DcRgnObj);
- GreDeleteObject(DcRgn);
+ /*
+ * Check if we have these specific windows style bits set/reset.
+ * FIXME: There may be other combinations of styles that need
this handling as well.
+ * This fixes the ReactOS Calculator buttons disappearing in
CORE-16827.
+ */
+ if ((Window->style & WS_CLIPSIBLINGS) &&
!(Window->style & (WS_POPUP | WS_CLIPCHILDREN | WS_SIZEBOX)))
+ {
+ IntSendNCPaint(pwnd, HRGN_WINDOW); // Paint the whole frame.
+ }
+ else // Use region handling
+ {
+ HRGN DcRgn = NtGdiCreateRectRgn(0, 0, 0, 0);
+ PREGION DcRgnObj = REGION_LockRgn(DcRgn);
+ TRACE("SWP_FRAMECHANGED win %p hRgn %p\n",pwnd,
DcRgn);
+ IntGdiCombineRgn(DcRgnObj, VisBefore, NULL, RGN_COPY);
+ REGION_UnlockRgn(DcRgnObj);
+ ForceNCPaintErase(pwnd, DcRgn, DcRgnObj);
+ GreDeleteObject(DcRgn);
+ }
}
}
}