diff options
Diffstat (limited to 'platform')
-rw-r--r-- | platform/x11/os_x11.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index 66c02561b5..c5f8e7c3c9 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -1193,6 +1193,7 @@ bool OS_X11::is_window_maximized() const { unsigned long len; unsigned long remaining; unsigned char *data = NULL; + bool retval = false; int result = XGetWindowProperty( x11_display, @@ -1221,13 +1222,15 @@ bool OS_X11::is_window_maximized() const { if (atoms[i] == wm_max_vert) found_wm_max_vert = true; - if (found_wm_max_horz && found_wm_max_vert) - return true; + if (found_wm_max_horz && found_wm_max_vert) { + retval = true; + break; + } } - XFree(atoms); } - return false; + XFree(data); + return retval; } void OS_X11::set_window_always_on_top(bool p_enabled) { |