From 28012c40fb5d86d6d5fc4fa4c8ab71b726ec520c Mon Sep 17 00:00:00 2001 From: Christopher Foo Date: Mon, 8 May 2023 20:23:45 -0400 Subject: 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) --- platform/linuxbsd/x11/display_server_x11.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'platform') diff --git a/platform/linuxbsd/x11/display_server_x11.cpp b/platform/linuxbsd/x11/display_server_x11.cpp index 3f57a95dea..d70efb53f8 100644 --- a/platform/linuxbsd/x11/display_server_x11.cpp +++ b/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 -- cgit v1.2.3