From 4222ef30e6929dabc6a0eb60827e06a36c39f8b1 Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Mon, 20 May 2024 12:31:56 -0400 Subject: [PATCH] Revert "chore: Update to latest nixos-unstable release" Latest changes break a bit too many things including ironbar. Auto-save in neovim is delayed a bit, which could have fixed a bug but will take some getting used to. The update brings crackling audio issues to osu! wine again, so more investigating will need to be done to find a solution for that. Overall seems like most wine programs broke, so a new wine prefix could be in order. Additionally, Librewolf now has some unexpected keybinding behavior with Ctrl+L + Ctrl+C resulting in the letter `c` being displayed instead of copying like before. --- flake.lock | 18 ++++---- overlays/hyprland.nix | 5 +++ patches/hyprland-fix-fcitx-window-focus.patch | 44 +++++++++++++++++++ 3 files changed, 58 insertions(+), 9 deletions(-) create mode 100644 overlays/hyprland.nix create mode 100644 patches/hyprland-fix-fcitx-window-focus.patch diff --git a/flake.lock b/flake.lock index 905a7cb8..d10f438f 100644 --- a/flake.lock +++ b/flake.lock @@ -170,11 +170,11 @@ ] }, "locked": { - "lastModified": 1715930644, - "narHash": "sha256-W9pyM3/vePxrffHtzlJI6lDS3seANQ+Nqp+i58O46LI=", + "lastModified": 1714377222, + "narHash": "sha256-UsDsjWCKlWn8vbXi8Zza9Hkq3xyk8fpvFNo2VM5S74E=", "owner": "nix-community", "repo": "home-manager", - "rev": "e3ad5108f54177e6520535768ddbf1e6af54b59d", + "rev": "2af7c78b7bb9cf18406a193eba13ef9f99388f49", "type": "github" }, "original": { @@ -185,11 +185,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1716137900, - "narHash": "sha256-sowPU+tLQv8GlqtVtsXioTKeaQvlMz/pefcdwg8MvfM=", + "lastModified": 1714253743, + "narHash": "sha256-mdTQw2XlariysyScCv2tTE45QSU9v/ezLcHJ22f0Nxc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "6c0b7a92c30122196a761b440ac0d46d3d9954f1", + "rev": "58a1abdbae3217ca6b702f03d3b35125d88a2994", "type": "github" }, "original": { @@ -214,11 +214,11 @@ ] }, "locked": { - "lastModified": 1715569474, - "narHash": "sha256-2W5oYJLusTxBztQ9FyyxvM7HM/XxjRs0qe4mhNeBfR8=", + "lastModified": 1712608151, + "narHash": "sha256-QI/Hp0UuZRg/X06wH5c0w+pN0aTFnpNhgKO0gKvxrAw=", "owner": "donovanglover", "repo": "sakaya", - "rev": "848c0485300b5c62f0fd360701b26c3219e4f339", + "rev": "fd3781686d01f002b802e0642c2f0eb4ef18624b", "type": "github" }, "original": { diff --git a/overlays/hyprland.nix b/overlays/hyprland.nix new file mode 100644 index 00000000..f02dbf3e --- /dev/null +++ b/overlays/hyprland.nix @@ -0,0 +1,5 @@ +final: prev: { + hyprland = prev.hyprland.overrideAttrs (oldAttrs: { + patches = (oldAttrs.patches or [ ]) ++ [ ../patches/hyprland-fix-fcitx-window-focus.patch ]; + }); +} diff --git a/patches/hyprland-fix-fcitx-window-focus.patch b/patches/hyprland-fix-fcitx-window-focus.patch new file mode 100644 index 00000000..ec6658a2 --- /dev/null +++ b/patches/hyprland-fix-fcitx-window-focus.patch @@ -0,0 +1,44 @@ +From 31d055f6d487bd72fca5b10822e3f3bd95e94cc9 Mon Sep 17 00:00:00 2001 +From: drendog <53359960+drendog@users.noreply.github.com> +Date: Wed, 24 Apr 2024 00:30:35 +0200 +Subject: [PATCH] input: fix active keyboard for seat after destroying one + (#5725) + +* fix: manage active keyboard for seat after destroying one + +* chore: clang-format +--- + src/managers/input/InputManager.cpp | 19 +++++++++---------- + 1 file changed, 9 insertions(+), 10 deletions(-) + +diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp +index 0aad318918a..b5d6bb5c331 100644 +--- a/src/managers/input/InputManager.cpp ++++ b/src/managers/input/InputManager.cpp +@@ -1152,17 +1152,16 @@ void CInputManager::destroyKeyboard(SKeyboard* pKeyboard) { + + xkb_state_unref(pKeyboard->xkbTranslationState); + +- if (pKeyboard->active) { +- m_lKeyboards.remove(*pKeyboard); ++ m_lKeyboards.remove(*pKeyboard); + +- if (m_lKeyboards.size() > 0) { +- m_pActiveKeyboard = &m_lKeyboards.back(); +- m_pActiveKeyboard->active = true; +- } else { +- m_pActiveKeyboard = nullptr; +- } +- } else +- m_lKeyboards.remove(*pKeyboard); ++ if (m_lKeyboards.size() > 0) { ++ m_pActiveKeyboard = &m_lKeyboards.back(); ++ m_pActiveKeyboard->active = true; ++ wlr_seat_set_keyboard(g_pCompositor->m_sSeat.seat, wlr_keyboard_from_input_device(m_pActiveKeyboard->keyboard)); ++ } else { ++ m_pActiveKeyboard = nullptr; ++ wlr_seat_set_keyboard(g_pCompositor->m_sSeat.seat, nullptr); ++ } + } + + void CInputManager::destroyMouse(wlr_input_device* mouse) {