diff --git a/docs/changelog.rst b/docs/changelog.rst index bd9e68ef0..9b3432997 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -395,6 +395,9 @@ Detailed list of changes downloaded only once and images are decoded only once for all such outputs. Specifying the same output file twice is now an error (:pull:`10744`) +- Wayland: Fix :option:`kitty --os-window-tag` not setting the window tag + (:iss:`10759`) + - Clipboard kitten: Correctly detect duplicate output files when a path contains a symlink followed by ``..``, avoiding overwrites of the same target and erroneous rejection of distinct output files diff --git a/glfw/wl_window.c b/glfw/wl_window.c index 54c80c5f3..a5843c018 100644 --- a/glfw/wl_window.c +++ b/glfw/wl_window.c @@ -1555,6 +1555,7 @@ _glfwPlatformCreateWindow( csd_initialize_metrics(window); window->wl.transparent = fbconfig->transparent; strncpy(window->wl.appId, wndconfig->wl.appId, sizeof(window->wl.appId)); + strncpy(window->wl.windowTag, wndconfig->wl.windowTag, sizeof(window->wl.windowTag)); window->swaps_disallowed = true; if (!create_surface(window, wndconfig)) return false; diff --git a/kitty/glfw.c b/kitty/glfw.c index 81bac2826..04ae94688 100644 --- a/kitty/glfw.c +++ b/kitty/glfw.c @@ -2361,6 +2361,8 @@ create_os_window(PyObject UNUSED *self, PyObject *args, PyObject *kw) { glfwWindowHintString(GLFW_X11_INSTANCE_NAME, wm_class_name); glfwWindowHintString(GLFW_X11_CLASS_NAME, wm_class_class); glfwWindowHintString(GLFW_WAYLAND_APP_ID, wm_class_class); + // wm_class_name defaults to wm_class_class when not specified, only set the tag when it was specified + glfwWindowHintString(GLFW_WAYLAND_WINDOW_TAG, strcmp(wm_class_name, wm_class_class) == 0 ? "" : wm_class_name); #endif if (global_state.num_os_windows >= MAX_CHILDREN) {