Merge pull request #16763 from RandomShaper/improve-fullscreen

Remove window decorations for fullscreen on X11
This commit is contained in:
Hein-Pieter van Braam 2018-02-19 20:21:43 +01:00 committed by GitHub
commit 6d99975707
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;