summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorHein-Pieter van Braam <hp@tmm.cx>2018-02-19 20:21:43 +0100
committerGitHub <noreply@github.com>2018-02-19 20:21:43 +0100
commit6d99975707e51b5925c847fac4e88a55d5981408 (patch)
treefc3b16be83d1a86a5909df50087778e8bd52071c /platform
parentb93d6a001b15d544ea346c4804fb0d853ab11622 (diff)
parent935a99e758b169299119dcb1d4e8497b12d902a7 (diff)
Merge pull request #16763 from RandomShaper/improve-fullscreen
Remove window decorations for fullscreen on X11
Diffstat (limited to 'platform')
-rw-r--r--platform/x11/os_x11.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp
index 2d8e32137f..ceaa5ddb07 100644
--- a/platform/x11/os_x11.cpp
+++ b/platform/x11/os_x11.cpp
@@ -730,6 +730,16 @@ 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 (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.
XSizeHints *xsh;