awful.screen.focus: Prevent focusing a screen that doesn't exist
Signed-off-by: Christopher Eatinger <christopher.eatinger@gmail.com> Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
69b4b2650d
commit
933c958220
|
@ -23,6 +23,7 @@ data.padding = {}
|
|||
--- Give the focus to a screen, and move pointer.
|
||||
-- @param screen Screen number.
|
||||
function focus(screen)
|
||||
if screen > capi.screen.count() then screen = capi.mouse.screen end
|
||||
local c = client.focus.history.get(screen, 0)
|
||||
if c then capi.client.focus = c end
|
||||
-- Move the mouse on the screen
|
||||
|
|
Loading…
Reference in New Issue