From b824d002843e637af9acf6ad08e45b65cfd96ee0 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Fri, 25 Sep 2015 00:18:33 +0200 Subject: [PATCH] ewmh.activate: only focus visible clients Since focus can be moved to non-visible clients nowadays, this needs to be checked in the `request::activate` handler. Fixes https://github.com/awesomeWM/awesome/issues/455. --- lib/awful/ewmh.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/awful/ewmh.lua b/lib/awful/ewmh.lua index 38303f0de..6d37c0784 100644 --- a/lib/awful/ewmh.lua +++ b/lib/awful/ewmh.lua @@ -160,7 +160,9 @@ end -- @tparam[opt] table hints A table with additional hints: -- @tparam[opt=false] boolean hints.raise should the client be raised? function ewmh.activate(c, context, hints) - client.focus = c + if c:isvisible() then + client.focus = c + end if hints and hints.raise then if awesome.startup or c:isvisible() then c:raise()