From 5ac548544ff6b3d52c6591385d9029164e766d71 Mon Sep 17 00:00:00 2001 From: Joachim Henze Date: Mon, 15 Apr 2019 19:46:36 +0200 Subject: [PATCH] [0.4.12] [WIN32SS] Appease regression CORE-15429 & fix CORE-15911 By applying for the first time clientFix.patch from CORE-15911 contributed by JIRA-user 'I_Kill_Bugs'. The patch acts as a better replacement for a workaround of DougLyons from CORE-15429 that aimed to hide the issue for our file-browser only. The new approach gave good results for the testbots https://reactos.org/testman/compare.php?ids=66723,66729 but wasn't tested much yet. In case it causes any problems during testing-cycle, I might eventually switch back to our old workaround instead from the last releases. --- win32ss/user/ntuser/winpos.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/win32ss/user/ntuser/winpos.c b/win32ss/user/ntuser/winpos.c index d7f5ad6a639..077915b3547 100644 --- a/win32ss/user/ntuser/winpos.c +++ b/win32ss/user/ntuser/winpos.c @@ -1778,7 +1778,7 @@ co_WinPosSetWindowPos( } /* Calculate the non client area for resizes, as this is used in the copy region */ - if (!(WinPos.flags & SWP_NOSIZE)) + if ((WinPos.flags & (SWP_NOSIZE | SWP_FRAMECHANGED)) != SWP_NOSIZE) { VisBeforeJustClient = VIS_ComputeVisibleRegion(Window, TRUE, FALSE, (Window->style & WS_CLIPSIBLINGS) ? TRUE : FALSE); @@ -1912,12 +1912,16 @@ co_WinPosSetWindowPos( */ CopyRgn = IntSysCreateRectpRgn(0, 0, 0, 0); - if (WinPos.flags & SWP_NOSIZE) + if ((WinPos.flags & SWP_NOSIZE) && (WinPos.flags & SWP_NOCLIENTSIZE)) RgnType = IntGdiCombineRgn(CopyRgn, VisAfter, VisBefore, RGN_AND); else if (VisBeforeJustClient != NULL) { RgnType = IntGdiCombineRgn(CopyRgn, VisAfter, VisBeforeJustClient, RGN_AND); - REGION_Delete(VisBeforeJustClient); + } + + if (VisBeforeJustClient != NULL) + { + REGION_Delete(VisBeforeJustClient); } /* Now use in copying bits which are in the update region. */