From 64691cfc9a47d776df67ff1f6f73f7022bba189a Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Tue, 20 Feb 2024 16:53:56 +0700 Subject: [PATCH] overview: workaround for hyprland's windows start menu bug ## the bug - open layershell with keyboard focus - focus another window or go to another workspace - close the layer -> focus goes back to the window which was focused when you open the layer shell ## solution - close the layer, wait a bit then focus --- .config/ags/modules/overview/overview_hyprland.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/ags/modules/overview/overview_hyprland.js b/.config/ags/modules/overview/overview_hyprland.js index 26b82f061..f6983161f 100644 --- a/.config/ags/modules/overview/overview_hyprland.js +++ b/.config/ags/modules/overview/overview_hyprland.js @@ -113,8 +113,8 @@ export default () => { margin-bottom: -${Math.round((y + h) * OVERVIEW_SCALE)}px; `, onClicked: (self) => { - Hyprland.messageAsync(`dispatch focuswindow address:${address}`); App.closeWindow('overview'); + Utils.timeout(100, () => Hyprland.messageAsync(`dispatch focuswindow address:${address}`)); }, onMiddleClickRelease: () => Hyprland.messageAsync(`dispatch closewindow address:${address}`), onSecondaryClick: (button) => {