Quellcode durchsuchen

Ensure WindowData minimized/maximized are mutually exclusive

The window manager can break the assumption that
fullscreen/maximized/minimized values are mutually exclusive.

(cherry picked from commit e4d052e284c04c9fd41d42de40151451e8756a6b)
Christopher Foo vor 2 Jahren
Ursprung
Commit
28012c40fb
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 2 2
      platform/linuxbsd/x11/display_server_x11.cpp

+ 2 - 2
platform/linuxbsd/x11/display_server_x11.cpp

@@ -3483,8 +3483,8 @@ void DisplayServerX11::_window_changed(XEvent *event) {
 
 	// Query display server about a possible new window state.
 	wd.fullscreen = _window_fullscreen_check(window_id);
-	wd.minimized = _window_minimize_check(window_id);
-	wd.maximized = _window_maximize_check(window_id, "_NET_WM_STATE");
+	wd.maximized = _window_maximize_check(window_id, "_NET_WM_STATE") && !wd.fullscreen;
+	wd.minimized = _window_minimize_check(window_id) && !wd.fullscreen && !wd.maximized;
 
 	{
 		//the position in xconfigure is not useful here, obtain it manually