From f422b9e6edc147b33c8f0c9bf218c74665aaac1c Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Wed, 17 Apr 2024 11:25:28 -0400 Subject: [PATCH] feat: Upgrade from kitty 0.31.0 to 0.34.0 CJK fonts seem to finally be fixed and look reasonably good in the latest version of kitty, so compiling it ourselves is no longer needed. --- overlays/kitty.nix | 22 ---------- patches/kitty-wlroots-copying-fix.patch | 55 ------------------------- 2 files changed, 77 deletions(-) delete mode 100644 overlays/kitty.nix delete mode 100644 patches/kitty-wlroots-copying-fix.patch diff --git a/overlays/kitty.nix b/overlays/kitty.nix deleted file mode 100644 index 808ec02a..00000000 --- a/overlays/kitty.nix +++ /dev/null @@ -1,22 +0,0 @@ -final: prev: { - kitty = prev.kitty.overrideAttrs (oldAttrs: rec { - version = "0.31.0"; - - src = prev.fetchFromGitHub { - owner = "kovidgoyal"; - repo = "kitty"; - rev = "refs/tags/v${version}"; - hash = "sha256-VWWuC4T0pyTgqPNm0gNL1j3FShU5b8S157C1dKLon1g="; - }; - - goModules = (prev.buildGoModule { - pname = "kitty-go-modules"; - inherit src version; - vendorHash = "sha256-OyZAWefSIiLQO0icxMIHWH3BKgNas8HIxLcse/qWKcU="; - }).goModules; - - patches = (oldAttrs.patches or [ ]) ++ [ - ../patches/kitty-wlroots-copying-fix.patch - ]; - }); -} diff --git a/patches/kitty-wlroots-copying-fix.patch b/patches/kitty-wlroots-copying-fix.patch deleted file mode 100644 index 7af25b77..00000000 --- a/patches/kitty-wlroots-copying-fix.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 69a5c7e3b232ab050a6eb1a2b40c235f5a0d9ccf Mon Sep 17 00:00:00 2001 -From: Kovid Goyal -Date: Fri, 8 Dec 2023 08:38:08 +0530 -Subject: [PATCH] Wayland: Fix a regression in the previous release that broke - copying to clipboard under wl-roots based compositors in some circumstances - -As is usual in Wayland land, utter chaos. Divergent implementations, -incorrect interpretations of the spec, bla bla. - -Fixes #6890 ---- - docs/changelog.rst | 3 +++ - glfw/wl_window.c | 14 ++++++++++++-- - 2 files changed, 15 insertions(+), 2 deletions(-) - -diff --git a/docs/changelog.rst b/docs/changelog.rst -index 2a8295c5aef..0193b12c4c8 100644 ---- a/docs/changelog.rst -+++ b/docs/changelog.rst -@@ -54,6 +54,9 @@ Detailed list of changes - - - A new action :ac:`send_key` to simplify mapping key presses to other keys without needing :ac:`send_text` - -+- Wayland: Fix a regression in the previous release that broke copying to clipboard under wl-roots based compositors in some circumstances -+ (:iss:`6890`) -+ - - 0.31.0 [2023-11-08] - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -diff --git a/glfw/wl_window.c b/glfw/wl_window.c -index 0dcc868e3c9..b64a29ca62d 100644 ---- a/glfw/wl_window.c -+++ b/glfw/wl_window.c -@@ -2034,9 +2034,19 @@ _glfwPlatformSetClipboard(GLFWClipboardType t) { - f(data_source, cd->mime_types[i]); - } - if (t == GLFW_CLIPBOARD) { -- // According to the Wayland spec only the application that has keyboard focus can set the clipboard. -+ // According to some interpretations of the Wayland spec only the application that has keyboard focus can set the clipboard. - // Hurray for the Wayland nanny state! -- wl_data_device_set_selection(_glfw.wl.dataDevice, _glfw.wl.dataSourceForClipboard, _glfw.wl.keyboard_enter_serial); -+ // -+ // However in wl-roots based compositors, using the serial from the keyboard enter event doesn't work. No clue what -+ // the correct serial to use here is. Given this Wayland there probably isn't one. What a joke. -+ // Bug report: https://github.com/kovidgoyal/kitty/issues/6890 -+ // Ironically one of the contributors to wl_roots claims the keyboard enter serial is the correct one to use: -+ // https://emersion.fr/blog/2020/wayland-clipboard-drag-and-drop/ -+ // The Wayland spec itself says "serial number of the event that triggered this request" -+ // https://wayland.freedesktop.org/docs/html/apa.html#protocol-spec-wl_data_device -+ // So who the fuck knows. Just use the latest received serial and ask anybody that uses Wayland -+ // to get their head examined. -+ wl_data_device_set_selection(_glfw.wl.dataDevice, _glfw.wl.dataSourceForClipboard, _glfw.wl.serial); - } else { - // According to the Wayland spec we can only set the primary selection in response to a pointer button event - // Hurray for the Wayland nanny state!