Wayland: Allow using the --class to set the app id

Fixes #862
This commit is contained in:
Kovid Goyal
2018-09-06 06:54:04 +05:30
parent 3bd45966c6
commit 33f0ac83c1
9 changed files with 20 additions and 1 deletions

View File

@@ -464,7 +464,7 @@ def options_spec():
dest=cls
default={appname}
condition=not is_macos
Set the class part of the :italic:`WM_CLASS` window property
Set the class part of the :italic:`WM_CLASS` window property. On Wayland, it sets the app id.
--name

2
kitty/glfw-wrapper.h generated
View File

@@ -745,6 +745,8 @@ typedef int (* GLFWapplicationshouldhandlereopenfun)(int);
#define GLFW_X11_CLASS_NAME 0x00024001
#define GLFW_X11_INSTANCE_NAME 0x00024002
#define GLFW_WAYLAND_APP_ID 0x00025001
/*! @} */
#define GLFW_NO_API 0

View File

@@ -409,6 +409,7 @@ create_os_window(PyObject UNUSED *self, PyObject *args) {
#ifndef __APPLE__
glfwWindowHintString(GLFW_X11_INSTANCE_NAME, wm_class_name);
glfwWindowHintString(GLFW_X11_CLASS_NAME, wm_class_class);
glfwWindowHintString(GLFW_WAYLAND_APP_ID, wm_class_class);
if (OPT(x11_hide_window_decorations)) {
glfwWindowHint(GLFW_DECORATED, GLFW_FALSE);
}