[0.4.12] [NtUser] Apply review of jimtabor
authorJoachim Henze <Joachim.Henze@reactos.org>
Tue, 21 May 2019 22:30:10 +0000 (00:30 +0200)
committerJoachim Henze <Joachim.Henze@reactos.org>
Tue, 21 May 2019 22:30:10 +0000 (00:30 +0200)
to the workaround in last commit 0.4.12-RC-19-g
700779e643d4154d4a8bb569810171aaa4f3c72a

Many thanks to reviewer jimtabor for this very prompt review!

I tested, the new state still succeeds in CORE-15477, CORE-14979, CORE-15599, CORE-15600, CORE-15654

Fixes 'multiple apps leaving the taskbar visible erroneously when switching into fullscreen.'
Please note that the problem with taskbar staying visible is only fixed for some, but not all apps
(see CORE-11242 for some still failing examples, e.g: Bound Around).

We now have the same state in 0.4.12RCs, that we just have committed to master in 0.4.13-dev-247-g
0f29b3faa7770c441d084e4b41ceba555d4181ab

win32ss/user/ntuser/display.c

index 8032364..25b1f94 100644 (file)
@@ -830,6 +830,8 @@ UserChangeDisplaySettings(
             gpsi->Planes      = ppdev->gdiinfo.cPlanes;
             gpsi->BitsPixel   = ppdev->gdiinfo.cBitsPixel;
             gpsi->BitCount    = gpsi->Planes * gpsi->BitsPixel;
+            gpsi->aiSysMet[SM_CXSCREEN] = ppdev->gdiinfo.ulHorzRes;
+            gpsi->aiSysMet[SM_CYSCREEN] = ppdev->gdiinfo.ulVertRes;
             if (ppdev->gdiinfo.flRaster & RC_PALETTE)
             {
                 gpsi->PUSIFlags |= PUSIF_PALETTEDISPLAY;
@@ -855,13 +857,13 @@ UserChangeDisplaySettings(
         //IntHideDesktop(pdesk);
 
         /* Send WM_DISPLAYCHANGE to all toplevel windows */
-        co_IntSendMessageTimeout(HWND_BROADCAST,
-                                 WM_DISPLAYCHANGE,
-                                 (WPARAM)ppdev->gdiinfo.cBitsPixel,
-                                 (LPARAM)(ppdev->gdiinfo.ulHorzRes + (ppdev->gdiinfo.ulVertRes << 16)),
-                                 SMTO_NORMAL,
-                                 100,
-                                 &ulResult);
+        co_IntSendMessageTimeout( HWND_BROADCAST,
+                                  WM_DISPLAYCHANGE,
+                                  gpsi->BitCount,
+                                  MAKELONG(gpsi->aiSysMet[SM_CXSCREEN], gpsi->aiSysMet[SM_CYSCREEN]),
+                                  SMTO_NORMAL,
+                                  100,
+                                  &ulResult );
 
         ERR("BitCount New %d Orig %d ChkNew %d\n",gpsi->BitCount,OrigBC,ppdev->gdiinfo.cBitsPixel);