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.
This commit is contained in:
Jan Bader 2023-05-21 22:32:33 +02:00 committed by GitHub
parent 485661b706
commit a9136bc682
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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 = {}