From a9136bc682a0f940a18222695eca7ccc8b452a3a Mon Sep 17 00:00:00 2001 From: Jan Bader Date: Sun, 21 May 2023 22:32:33 +0200 Subject: [PATCH] Fix focus.global_bydirection not moving focus from empty screen When having three monitors and only one client on the first monitor, the function does not work when the middle monitor is focused, as it uses the focused clients' screen instead of the currently focused screen as the base. --- lib/awful/client/focus.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/awful/client/focus.lua b/lib/awful/client/focus.lua index 1deb9d7ed..c3a19e38b 100644 --- a/lib/awful/client/focus.lua +++ b/lib/awful/client/focus.lua @@ -208,7 +208,7 @@ function focus.global_bydirection(dir, c, stacked) -- if focus not changed, we must change screen if sel == capi.client.focus then - screen.focus_bydirection(dir, scr) + screen.focus_bydirection(dir, screen.focused()) if scr ~= get_screen(screen.focused()) then local cltbl = client.visible(screen.focused(), stacked) local geomtbl = {}