summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-03-31 23:57:13 +0200
committerGitHub <noreply@github.com>2022-03-31 23:57:13 +0200
commit0898f04e4ee6c3e54307d9ce91b0bae97e3af63f (patch)
tree1c8a540e11cd457af0030beaf44ce1e826771525
parent142a039f43cba550f9a2a2eadc7ded019d871eeb (diff)
parent2eb36b8bdb137f8164974dddd1d63646c27b23b4 (diff)
Merge pull request #59768 from ConteZero/window_unmaximize_master
-rw-r--r--platform/linuxbsd/display_server_x11.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/platform/linuxbsd/display_server_x11.cpp b/platform/linuxbsd/display_server_x11.cpp
index 2ddccdb8bf..8fa8c64efe 100644
--- a/platform/linuxbsd/display_server_x11.cpp
+++ b/platform/linuxbsd/display_server_x11.cpp
@@ -1732,8 +1732,15 @@ bool DisplayServerX11::_window_maximize_check(WindowID p_window, const char *p_a
if (result == Success && data) {
Atom *atoms = (Atom *)data;
- Atom wm_act_max_horz = XInternAtom(x11_display, "_NET_WM_ACTION_MAXIMIZE_HORZ", False);
- Atom wm_act_max_vert = XInternAtom(x11_display, "_NET_WM_ACTION_MAXIMIZE_VERT", False);
+ Atom wm_act_max_horz;
+ Atom wm_act_max_vert;
+ if (strcmp(p_atom_name, "_NET_WM_STATE") == 0) {
+ wm_act_max_horz = XInternAtom(x11_display, "_NET_WM_STATE_MAXIMIZED_HORZ", False);
+ wm_act_max_vert = XInternAtom(x11_display, "_NET_WM_STATE_MAXIMIZED_VERT", False);
+ } else {
+ wm_act_max_horz = XInternAtom(x11_display, "_NET_WM_ACTION_MAXIMIZE_HORZ", False);
+ wm_act_max_vert = XInternAtom(x11_display, "_NET_WM_ACTION_MAXIMIZE_VERT", False);
+ }
bool found_wm_act_max_horz = false;
bool found_wm_act_max_vert = false;