From 398e0930dcec5a870fa2ee7a1f81a8c8b3158c33 Mon Sep 17 00:00:00 2001 From: Richard Adenling Date: Fri, 18 Aug 2017 20:39:51 +0200 Subject: Set the X11 class hint before mapping the window Setting the class hint before mapping the window will allow some window managers to determine if a window should be treated specially. This is also in accordance with the ICCCM spec which says that WM_CLASS should only be changed when a window is in a withdrawn (unmapped) state. Fixes #10429 --- platform/x11/os_x11.cpp | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'platform/x11/os_x11.cpp') diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index ade3a0a0c..a23f2f132 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -351,20 +351,9 @@ void OS_X11::initialize(const VideoMode &p_desired, int p_video_driver, int p_au 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 = (char *)"Godot_Engine"; - classHint->res_class = (char *)"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); -- cgit v1.2.3-70-g09d2