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
|
@ -724,8 +724,8 @@ end
|
|||
-- @param c the client
|
||||
function setwfact(wfact, c)
|
||||
-- get the currently selected window
|
||||
local c = c or capi.client.focus
|
||||
if not c then return end
|
||||
local c = c or capi.client.focus
|
||||
if not c or not c:isvisible() then return end
|
||||
|
||||
local t = tag.selected(c.screen)
|
||||
local w = idx(c)
|
||||
|
|
Loading…
Reference in New Issue