Merge pull request #445 from Raventara/master

added XClassHint to windows in OS_X11::initialize
This commit is contained in:
reduz 2014-06-11 01:21:35 -03:00
commit 5f5cd5e6d1
1 changed files with 14 additions and 0 deletions

View File

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