screen: Fix potential nil index

This looks like a copy-paste error.
This commit is contained in:
Emmanuel Lepage Vallee 2016-08-01 15:29:02 -04:00
parent 41feec02a5
commit facf676b13
1 changed files with 5 additions and 1 deletions

View File

@ -230,7 +230,11 @@ end
-- present currently.
function screen.focused(args)
args = args or screen.default_focused_args or {}
return get_screen(args.client and capi.client.screen or capi.mouse.screen)
return get_screen(
(args.client and args.client.screen) or
(capi.client.focus and capi.client.focus.screen) or
capi.mouse.screen
)
end
--- Get a placement bounding geometry.