[0.4.12][WIN32SS] Fix regression CORE-16393
authorJoachim Henze <Joachim.Henze@reactos.org>
Wed, 7 Oct 2020 00:08:54 +0000 (02:08 +0200)
committerJoachim Henze <Joachim.Henze@reactos.org>
Wed, 7 Oct 2020 00:08:54 +0000 (02:08 +0200)
Symptom "cmd did not hide the taskbar anymore when switching to fullscreen"

Many different cases regressed by SVN r75407 == git
09ab5ea7ed2ab0e709ed2e8f8f9f6c3711b2ac7f

This is patch 3/3 into display.c to overcome all known regressions to date of SVN r75407
The other 2 patches were already backported into 0.4.12 by
0.4.12-RC-19-g700779e0.4.12-RC-20-ga112b89 (all also into display.c)

In sum this brings us in the context of this regression in this file to the state of
- for master:    0.4.14-dev-38-g96ef605
- for 0.4.13rls: 0.4.13-RC-11-g0a03b36

win32ss/user/ntuser/display.c

index 25b1f94..cd6a6a0 100644 (file)
@@ -783,6 +783,13 @@ UserChangeDisplaySettings(
         }
     }
 
+    /* Check if DEVMODE matches the current mode */
+    if (pdm == ppdev->pdmwDev && !(flags & CDS_RESET))
+    {
+        ERR("DEVMODE matches, nothing to do\n");
+        goto leave;
+    }
+
     /* Shall we apply the settings? */
     if (!(flags & CDS_NORESET))
     {
@@ -926,6 +933,11 @@ NtUserChangeDisplaySettings(
         return DISP_CHANGE_BADFLAGS;
     }
 
+    if ((dwflags & CDS_RESET) && (dwflags & CDS_NORESET))
+    {
+        return DISP_CHANGE_BADFLAGS;
+    }
+
     /* Copy the device name */
     if (pustrDevice)
     {