diff options
author | Guilherme Felipe <guilhermefelipecgs@gmail.com> | 2018-10-05 17:18:10 -0300 |
---|---|---|
committer | Guilherme Felipe <guilhermefelipecgs@gmail.com> | 2018-10-05 17:18:10 -0300 |
commit | f40225393900885a16591cdb68158ca50e3612fa (patch) | |
tree | 331553ad4054295cef13e13ef25e6600b38636c2 /platform | |
parent | 8068d0217a5e74c25f83fe93fa6e077b8d0b3bf5 (diff) |
[x11] Use "application/config/name" for WM_CLASS
Diffstat (limited to 'platform')
-rw-r--r-- | platform/x11/os_x11.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index 5be0b9304a..9df5daa1bd 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -2849,11 +2849,19 @@ void OS_X11::set_context(int p_context) { XClassHint *classHint = XAllocClassHint(); if (classHint) { + char *wm_class = (char *)"Godot"; if (p_context == CONTEXT_EDITOR) classHint->res_name = (char *)"Godot_Editor"; if (p_context == CONTEXT_PROJECTMAN) classHint->res_name = (char *)"Godot_ProjectList"; - classHint->res_class = (char *)"Godot"; + + if (p_context == CONTEXT_ENGINE) { + classHint->res_name = (char *)"Godot_Engine"; + wm_class = (char *)((String)GLOBAL_GET("application/config/name")).utf8().ptrw(); + } + + classHint->res_class = wm_class; + XSetClassHint(x11_display, x11_window, classHint); XFree(classHint); } |