Prevent nil dereference when no focussed client
This commit is contained in:
parent
c2170dbc1d
commit
21b412ece2
2
init.lua
2
init.lua
|
@ -81,7 +81,7 @@ local function start_loop(is_swap,is_max)
|
|||
end
|
||||
|
||||
function module.focus(direction,c,max)
|
||||
local screen = (c or capi.client.focus).screen
|
||||
local screen = (c and c.screen) or (capi.client.focus and capi.client.focus.screen) or capi.mouse.screen
|
||||
-- Useless when there is only 1 client tiled, incompatible with the "max_out" mode (in this case, focus floating mode)
|
||||
if awful.layout.get(screen) == awful.layout.suit.max and #awful.client.tiled(screen) > 1 and not max then
|
||||
current_mode = "max"
|
||||
|
|
Loading…
Reference in New Issue