awful.client.setwfact: Handle invisible clients (FS#693)
setwfact() calls idx() on the client that it works on. When idx() is called with a client that isn't visible, it fails while trying to find outs the client's index in the current layout. event_handle_mousegrabber:119: error running function: lib/awful/client.lua:688: attempt to compare nil with number Fix this by ignoring all clients that aren't visible in setwfact(). Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
35286d5ecc
commit
95403b9544
|
@ -725,7 +725,7 @@ end
|
||||||
function setwfact(wfact, c)
|
function setwfact(wfact, c)
|
||||||
-- get the currently selected window
|
-- get the currently selected window
|
||||||
local c = c or capi.client.focus
|
local c = c or capi.client.focus
|
||||||
if not c then return end
|
if not c or not c:isvisible() then return end
|
||||||
|
|
||||||
local t = tag.selected(c.screen)
|
local t = tag.selected(c.screen)
|
||||||
local w = idx(c)
|
local w = idx(c)
|
||||||
|
|
Loading…
Reference in New Issue