aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell2014-05-22 16:05:05 +1000
committerRussell2014-05-22 16:05:05 +1000
commit92eda764df29b15ca0c348e4c2eed1eac6360047 (patch)
tree43e8d9ea07cb9bee59b273df33cd9f8a16398b90
parentfee28f7a9d15e4b2bd71cb2365937910f92c8144 (diff)
downloadgodot-92eda764df29b15ca0c348e4c2eed1eac6360047.tar.gz
godot-92eda764df29b15ca0c348e4c2eed1eac6360047.tar.zst
godot-92eda764df29b15ca0c348e4c2eed1eac6360047.zip
added XClassHint to windows in OS_X11::initialize for improved window management in x11.
Diffstat (limited to '')
-rw-r--r--platform/x11/os_x11.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp
index 2cb824779..6470f0985 100644
--- a/platform/x11/os_x11.cpp
+++ b/platform/x11/os_x11.cpp
@@ -204,6 +204,20 @@ void OS_X11::initialize(const VideoMode& p_desired,int p_video_driver,int p_audi
XChangeWindowAttributes(x11_display, x11_window,CWEventMask,&new_attr);
+ XClassHint* classHint;
+
+ /* set the titlebar name */
+ XStoreName(x11_display, x11_window, "Godot");
+
+ /* set the name and class hints for the window manager to use */
+ classHint = XAllocClassHint();
+ if (classHint) {
+ classHint->res_name = "Godot";
+ classHint->res_class = "Godot";
+ }
+ XSetClassHint(x11_display, x11_window, classHint);
+ XFree(classHint);
+
wm_delete = XInternAtom(x11_display, "WM_DELETE_WINDOW", true);
XSetWMProtocols(x11_display, x11_window, &wm_delete, 1);