summaryrefslogtreecommitdiff
path: root/platform/x11/os_x11.cpp
diff options
context:
space:
mode:
authorGuilherme Felipe <guilhermefelipecgs@gmail.com>2018-05-23 16:25:41 -0300
committerGuilherme Felipe <guilhermefelipecgs@gmail.com>2018-05-23 17:42:31 -0300
commit8c17d8e6fe632564965d861936be0c7e63c689bf (patch)
treee2509de316b446f24f58b9085eada409399f7899 /platform/x11/os_x11.cpp
parentd55351ed20def8c84e36435ce8c85a1701b73ffd (diff)
More fixes to set_borderless_window
[x11] Preserve window size when calling this method. [osx] Make sure it don't make the window resizable if it's not needed. [windows] clean up the code.
Diffstat (limited to 'platform/x11/os_x11.cpp')
-rw-r--r--platform/x11/os_x11.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp
index 50cc209dca..7b514d0f90 100644
--- a/platform/x11/os_x11.cpp
+++ b/platform/x11/os_x11.cpp
@@ -1292,6 +1292,9 @@ void OS_X11::set_borderless_window(bool p_borderless) {
hints.decorations = current_videomode.borderless_window ? 0 : 1;
property = XInternAtom(x11_display, "_MOTIF_WM_HINTS", True);
XChangeProperty(x11_display, x11_window, property, property, 32, PropModeReplace, (unsigned char *)&hints, 5);
+
+ // Preserve window size
+ set_window_size(Size2(current_videomode.width, current_videomode.height));
}
bool OS_X11::get_borderless_window() {