From 2174b80c3fbb4ad6d380069dd02f7883f1258333 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sat, 14 Feb 2015 14:09:10 +0100 Subject: [PATCH] client_focus_update: allow "invisible" clients This removes the check for `client_maybevisible`, which now allows for `client.focus = c` from Lua for clients that do not are assigned to a tag yet. --- objects/client.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/objects/client.c b/objects/client.c index 1e2ea4f85..f5edffae2 100644 --- a/objects/client.c +++ b/objects/client.c @@ -301,9 +301,6 @@ client_focus_update(client_t *c) { lua_State *L = globalconf_get_lua_State(); - if(!client_maybevisible(c)) - return false; - if(globalconf.focus.client && globalconf.focus.client != c) { /* When we are called due to a FocusIn event (=old focused client @@ -354,7 +351,7 @@ client_focus_refresh(void) return; globalconf.focus.need_update = false; - if(c) + if(c && client_maybevisible(c)) { /* Make sure this window is unbanned and e.g. not minimized */ client_unban(c); @@ -1135,6 +1132,9 @@ client_unban(client_t *c) client_set_minimized(L, -1, false); client_set_hidden(L, -1, false); lua_pop(L, 1); + + if (globalconf.focus.client == c) + globalconf.focus.need_update = true; } }