From 95403b95449b51e08c11b5214c592a63a2203be5 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sat, 11 Dec 2010 14:20:42 +0100 Subject: [PATCH] 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 --- lib/awful/client.lua.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/awful/client.lua.in b/lib/awful/client.lua.in index ec810c326..676597525 100644 --- a/lib/awful/client.lua.in +++ b/lib/awful/client.lua.in @@ -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)