diff options
| author | Pedro J. Estébanez | 2018-02-16 21:49:17 +0100 |
|---|---|---|
| committer | Hein-Pieter van Braam | 2018-02-19 22:36:20 +0100 |
| commit | bafbd73b51099dcfacfed3062385ecca82fd3495 (patch) | |
| tree | 96467149cdfdcdad41b7a08a3b180c87cd79a503 /platform | |
| parent | ac6811c4fad4801c6ce9a339dbc6ea6eefbf87a3 (diff) | |
| download | godot-bafbd73b51099dcfacfed3062385ecca82fd3495.tar.gz godot-bafbd73b51099dcfacfed3062385ecca82fd3495.tar.zst godot-bafbd73b51099dcfacfed3062385ecca82fd3495.zip | |
Remove window decorations for fullscreen on X11
(cherry picked from commit 935a99e758b169299119dcb1d4e8497b12d902a7)
Diffstat (limited to 'platform')
| -rw-r--r-- | platform/x11/os_x11.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index 6561131e8..64b894c43 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -711,8 +711,15 @@ void OS_X11::get_fullscreen_mode_list(List<VideoMode> *p_list, int p_screen) con } void OS_X11::set_wm_fullscreen(bool p_enabled) { - if (current_videomode.fullscreen == p_enabled) - return; + if (p_enabled && !get_borderless_window()) { + // remove decorations if the window is not already borderless + Hints hints; + Atom property; + hints.flags = 2; + hints.decorations = 0; + property = XInternAtom(x11_display, "_MOTIF_WM_HINTS", True); + XChangeProperty(x11_display, x11_window, property, property, 32, PropModeReplace, (unsigned char *)&hints, 5); + } if (p_enabled && !is_window_resizable()) { // Set the window as resizable to prevent window managers to ignore the fullscreen state flag. |
