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.
This commit is contained in:
Daniel Hahler 2015-09-25 00:18:33 +02:00
parent 0414a579c2
commit b824d00284
1 changed files with 3 additions and 1 deletions

View File

@ -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()