summaryrefslogtreecommitdiff
path: root/platform/x11/os_x11.cpp
diff options
context:
space:
mode:
authorhondres <liu.gam3@gmail.com>2016-01-27 21:53:37 +0100
committerhondres <liu.gam3@gmail.com>2016-01-27 21:53:37 +0100
commit11e4c128aca9f2d687d06fe07e97c8636a27b17a (patch)
treebc1dd718c90b460eb8f679635b453932fa2b7b5d /platform/x11/os_x11.cpp
parent29353808f0391f78627c43090f1bff882d56f11e (diff)
x11: use different strings for WM_CLASS depending on context
Diffstat (limited to 'platform/x11/os_x11.cpp')
-rw-r--r--platform/x11/os_x11.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp
index f42e93b93f..89c674d537 100644
--- a/platform/x11/os_x11.cpp
+++ b/platform/x11/os_x11.cpp
@@ -1782,6 +1782,22 @@ String OS_X11::get_joy_guid(int p_device) const {
return input->get_joy_guid_remapped(p_device);
}
+void OS_X11::set_context(int p_context) {
+
+ XClassHint* classHint = NULL;
+ classHint = XAllocClassHint();
+ if (classHint) {
+
+ 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";
+ XSetClassHint(x11_display, x11_window, classHint);
+ XFree(classHint);
+ }
+}
+
OS_X11::OS_X11() {
#ifdef RTAUDIO_ENABLED