summaryrefslogtreecommitdiff
path: root/platform/x11
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2016-02-03 11:30:22 +0100
committerRémi Verschelde <remi@verschelde.fr>2016-02-03 11:30:22 +0100
commitc0aade4ba43eb2dc5a0f27d9e265e0011f187e09 (patch)
tree730bcd48cd0a4a19f581473e3916ed03e88414ff /platform/x11
parent7cb930dbede1b9c21cf138e4a38ebb9e3dbd099f (diff)
parent11e4c128aca9f2d687d06fe07e97c8636a27b17a (diff)
Merge pull request #3493 from Hinsbart/wm_class
x11: use different strings for WM_CLASS depending on context
Diffstat (limited to 'platform/x11')
-rw-r--r--platform/x11/os_x11.cpp16
-rw-r--r--platform/x11/os_x11.h2
2 files changed, 18 insertions, 0 deletions
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp
index 7c4c625dbc..34abfc1078 100644
--- a/platform/x11/os_x11.cpp
+++ b/platform/x11/os_x11.cpp
@@ -1781,6 +1781,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
diff --git a/platform/x11/os_x11.h b/platform/x11/os_x11.h
index 91dbeac284..0891e4b8eb 100644
--- a/platform/x11/os_x11.h
+++ b/platform/x11/os_x11.h
@@ -226,6 +226,8 @@ public:
virtual bool is_joy_known(int p_device);
virtual String get_joy_guid(int p_device) const;
+ virtual void set_context(int p_context);
+
void run();
OS_X11();