diff options
author | reduz <reduzio@gmail.com> | 2014-06-11 01:21:35 -0300 |
---|---|---|
committer | reduz <reduzio@gmail.com> | 2014-06-11 01:21:35 -0300 |
commit | 5f5cd5e6d1508f85ac1bffa44e122b4dc0e2bb1d (patch) | |
tree | 1103dfa92ab3d51e7cae52562720b743f51bb541 | |
parent | 9c5882883b95e563da49754064f32454a075079d (diff) | |
parent | 92eda764df29b15ca0c348e4c2eed1eac6360047 (diff) |
Merge pull request #445 from Raventara/master
added XClassHint to windows in OS_X11::initialize
-rw-r--r-- | platform/x11/os_x11.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index 14d31b864c..e7d9a4d691 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); |