summaryrefslogtreecommitdiff
path: root/platform/x11/os_x11.cpp
diff options
context:
space:
mode:
authorEv1lbl0w <ricasubtil@gmail.com>2020-03-23 12:42:19 +0000
committerEv1lbl0w <ricasubtil@gmail.com>2020-03-23 12:42:19 +0000
commitbc53288d1e0f8097d1837248c019e0ef0c0957e4 (patch)
tree8bb69534fa38815af3a7978ae3ee3f7bc5446ebf /platform/x11/os_x11.cpp
parentcbbe0743a9155f06d03d4b906209933192a02731 (diff)
Fixed WM_DELETE flag being set too late
Diffstat (limited to 'platform/x11/os_x11.cpp')
-rw-r--r--platform/x11/os_x11.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp
index e1f7691cf6..772913980b 100644
--- a/platform/x11/os_x11.cpp
+++ b/platform/x11/os_x11.cpp
@@ -267,6 +267,9 @@ Error OS_X11::initialize(const VideoMode &p_desired, int p_video_driver, int p_a
unsigned long valuemask = CWBorderPixel | CWColormap | CWEventMask;
x11_window = XCreateWindow(x11_display, RootWindow(x11_display, visualInfo->screen), 0, 0, OS::get_singleton()->get_video_mode().width, OS::get_singleton()->get_video_mode().height, 0, visualInfo->depth, InputOutput, visualInfo->visual, valuemask, &windowAttributes);
+ wm_delete = XInternAtom(x11_display, "WM_DELETE_WINDOW", true);
+ XSetWMProtocols(x11_display, x11_window, &wm_delete, 1);
+
//set_class_hint(x11_display, x11_window);
XMapWindow(x11_display, x11_window);
XFlush(x11_display);
@@ -476,9 +479,6 @@ Error OS_X11::initialize(const VideoMode &p_desired, int p_video_driver, int p_a
/* set the titlebar name */
XStoreName(x11_display, x11_window, "Godot");
- wm_delete = XInternAtom(x11_display, "WM_DELETE_WINDOW", true);
- XSetWMProtocols(x11_display, x11_window, &wm_delete, 1);
-
im_active = false;
im_position = Vector2();