summaryrefslogtreecommitdiffstats
path: root/platform/linuxbsd/display_server_x11.h
diff options
context:
space:
mode:
authorMatthewZelriche <67518084+MatthewZelriche@users.noreply.github.com>2022-08-30 12:52:24 -0600
committerMatthewZelriche <67518084+MatthewZelriche@users.noreply.github.com>2022-08-30 12:52:24 -0600
commit87937bcf87d628fcedd0e257cfbd075bb73ec8e3 (patch)
treed87a3b4952165b147eccbf9e5d47389cd17cd165 /platform/linuxbsd/display_server_x11.h
parentde5f13e9356c1c075ced91893a67164f062b36bc (diff)
downloadredot-engine-87937bcf87d628fcedd0e257cfbd075bb73ec8e3.tar.gz
Fix minimize/maximize not taking effect in X11.
Attempts to construct an X11 window in an initial state of minimized/maximized would fail due to the window being unmapped. We simply check for failed mode changes during an unmap and reapply them if necessary.
Diffstat (limited to 'platform/linuxbsd/display_server_x11.h')
-rw-r--r--platform/linuxbsd/display_server_x11.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/platform/linuxbsd/display_server_x11.h b/platform/linuxbsd/display_server_x11.h
index 6b9f57d78f..650598d243 100644
--- a/platform/linuxbsd/display_server_x11.h
+++ b/platform/linuxbsd/display_server_x11.h
@@ -152,6 +152,7 @@ class DisplayServerX11 : public DisplayServer {
Vector2i last_position_before_fs;
bool focused = true;
bool minimized = false;
+ bool maximized = false;
bool is_popup = false;
Rect2i parent_safe_rect;
@@ -268,10 +269,12 @@ class DisplayServerX11 : public DisplayServer {
void _update_real_mouse_position(const WindowData &wd);
bool _window_maximize_check(WindowID p_window, const char *p_atom_name) const;
bool _window_fullscreen_check(WindowID p_window) const;
- void _validate_fullscreen_on_map(WindowID p_window);
+ bool _window_minimize_check(WindowID p_window) const;
+ void _validate_mode_on_map(WindowID p_window);
void _update_size_hints(WindowID p_window);
void _set_wm_fullscreen(WindowID p_window, bool p_enabled);
void _set_wm_maximized(WindowID p_window, bool p_enabled);
+ void _set_wm_minimized(WindowID p_window, bool p_enabled);
void _update_context(WindowData &wd);