Activate focused client with `awful.client.movetoscreen`
The default config has this: awful.key({ modkey, }, "o", awful.client.movetoscreen ), This moves the client to the next screen and focuses that screen. But it does not ensure that the client is raised above any existing windows, e.g. when moving a floating client. This patch emits the `request::activate` signal if the client is currently focused, but only if the screen property actually has changed. Closes https://github.com/awesomeWM/awesome/pull/98.
This commit is contained in:
parent
7ae58b3208
commit
fbc72624d7
|
@ -542,8 +542,15 @@ function client.movetoscreen(c, s)
|
||||||
s = sel.screen + 1
|
s = sel.screen + 1
|
||||||
end
|
end
|
||||||
if s > sc then s = 1 elseif s < 1 then s = sc end
|
if s > sc then s = 1 elseif s < 1 then s = sc end
|
||||||
|
if sel.screen ~= s then
|
||||||
|
local sel_is_focused = sel == capi.client.focus
|
||||||
sel.screen = s
|
sel.screen = s
|
||||||
screen.focus(s)
|
screen.focus(s)
|
||||||
|
|
||||||
|
if sel_is_focused then
|
||||||
|
sel:emit_signal("request::activate", "client.movetoscreen")
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue