From e3071b4ca26601dd17fc2054fdda50ef56b4df00 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 2 Dec 2026 04:16:00 +0000 Subject: alacritty: keep IME on X11 Instead of the 0.12 fork, which nixpkgs' 0.17 left unused: a patch that reverts alacritty#8747 for X11, for alacritty#8907. --- pkgs/override/alacritty.nix | 20 ++++++-------------- pkgs/override/alacritty.patch | 17 +++++++++++++++++ 2 files changed, 23 insertions(+), 14 deletions(-) create mode 100644 pkgs/override/alacritty.patch (limited to 'pkgs/override') diff --git a/pkgs/override/alacritty.nix b/pkgs/override/alacritty.nix index f864fff6..6e582989 100644 --- a/pkgs/override/alacritty.nix +++ b/pkgs/override/alacritty.nix @@ -1,16 +1,8 @@ self: super: -super.alacritty.overrideAttrs (old: - if self.lib.versions.majorMinor old.version == "0.12" then - { - version = "${old.version}-tv"; - src = self.fetchFromGitHub { - owner = "4z3"; - repo = "alacritty"; - rev = "touchscreen-support-0.12"; - hash = "sha256-yDG7IeQUmJhKMJebhMDzHLb3UHGLcO1FVZnmGe5Xr9w="; - }; - } - else - builtins.trace "not overriding alacritty because unsupported version" {} -) +super.alacritty.overrideAttrs (old: { + patches = old.patches or [] ++ [ + # git -C ~/tmp/src/alacritty diff alacritty/src/display/window.rs > ~/hrm/pkgs/override/alacritty.patch + ./alacritty.patch + ]; +}) diff --git a/pkgs/override/alacritty.patch b/pkgs/override/alacritty.patch new file mode 100644 index 00000000..7e6ff9d2 --- /dev/null +++ b/pkgs/override/alacritty.patch @@ -0,0 +1,17 @@ +diff --git a/alacritty/src/display/window.rs b/alacritty/src/display/window.rs +index 4e5cccaf..13d20238 100644 +--- a/alacritty/src/display/window.rs ++++ b/alacritty/src/display/window.rs +@@ -442,7 +442,11 @@ impl Window { + pub fn set_ime_inhibitor(&mut self, inhibitor: ImeInhibitor, inhibit: bool) { + if self.ime_inhibitor.contains(inhibitor) != inhibit { + self.ime_inhibitor.set(inhibitor, inhibit); +- self.window.set_ime_allowed(self.ime_inhibitor.is_empty()); ++ // issue: https://github.com/alacritty/alacritty/issues/8907 ++ // basically reverts https://github.com/alacritty/alacritty/pull/8747 ++ if !self.is_x11 { ++ self.window.set_ime_allowed(self.ime_inhibitor.is_empty()); ++ } + } + } + -- cgit v1.3.1