Browse Source

Fix bug where maximized->fullscreen->windowed mode stays maximized.

jitspoe 1 year ago
parent
commit
7918e2b6d9
1 changed files with 3 additions and 1 deletions
  1. 3 1
      platform/windows/display_server_windows.cpp

+ 3 - 1
platform/windows/display_server_windows.cpp

@@ -1692,7 +1692,9 @@ void DisplayServerWindows::window_set_mode(WindowMode p_mode, WindowID p_window)
 			SystemParametersInfoA(SPI_SETMOUSETRAILS, restore_mouse_trails, 0, 0);
 			SystemParametersInfoA(SPI_SETMOUSETRAILS, restore_mouse_trails, 0, 0);
 			restore_mouse_trails = 0;
 			restore_mouse_trails = 0;
 		}
 		}
-	} else if (p_mode == WINDOW_MODE_WINDOWED) {
+	}
+
+	if (p_mode == WINDOW_MODE_WINDOWED) {
 		ShowWindow(wd.hWnd, SW_RESTORE);
 		ShowWindow(wd.hWnd, SW_RESTORE);
 		wd.maximized = false;
 		wd.maximized = false;
 		wd.minimized = false;
 		wd.minimized = false;