mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
Merge pull request #152 from blueyed/autofocus-use-request-activate
autofocus: emit `request::activate` signal
This commit is contained in:
commit
20cdb5d439
1 changed files with 6 additions and 2 deletions
|
@ -20,7 +20,9 @@ local function check_focus(obj)
|
|||
-- When no visible client has the focus...
|
||||
if not client.focus or not client.focus:isvisible() then
|
||||
local c = aclient.focus.history.get(obj.screen, 0)
|
||||
if c then client.focus = c end
|
||||
if c then
|
||||
c:emit_signal('request::activate', "autofocus.check_focus")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -38,7 +40,9 @@ local function check_focus_tag(t)
|
|||
check_focus({ screen = s })
|
||||
if client.focus and client.focus.screen ~= s then
|
||||
local c = aclient.focus.history.get(s, 0)
|
||||
if c then client.focus = c end
|
||||
if c then
|
||||
c:emit_signal('request::activate', "autofocus.check_focus_tag")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue