summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-09-21 10:23:52 +0200
committerGitHub <noreply@github.com>2017-09-21 10:23:52 +0200
commit0eec37e24781ff16979ed5ab6c8706a11584c3f5 (patch)
tree8163ba2b2590921b6f7a11882dc714772cd26f48
parent601564e9a9dde2c59e16033052f49f0be360e29f (diff)
parent2e74bf488b93efa6f0a8431584943ec178abd7db (diff)
Merge pull request #11141 from fcobos/x11_borderless_switch_fix
X11 - Adding borders back to a borderless window was not working.
-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 c0299f1c26..599c0d2278 100644
--- a/platform/x11/os_x11.cpp
+++ b/platform/x11/os_x11.cpp
@@ -708,6 +708,16 @@ void OS_X11::set_wm_fullscreen(bool p_enabled) {
XSetWMNormalHints(x11_display, x11_window, xsh);
XFree(xsh);
}
+
+ if (!p_enabled && !get_borderless_window()) {
+ // put decorations back if the window wasn't suppoesed to be borderless
+ Hints hints;
+ Atom property;
+ hints.flags = 2;
+ hints.decorations = 1;
+ property = XInternAtom(x11_display, "_MOTIF_WM_HINTS", True);
+ XChangeProperty(x11_display, x11_window, property, property, 32, PropModeReplace, (unsigned char *)&hints, 5);
+ }
}
int OS_X11::get_screen_count() const {