From facf676b1367e6915235a45ce3e7ef11790b0411 Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Mon, 1 Aug 2016 15:29:02 -0400 Subject: [PATCH] screen: Fix potential nil index This looks like a copy-paste error. --- lib/awful/screen.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/awful/screen.lua b/lib/awful/screen.lua index 162628cfa..253bd7bec 100644 --- a/lib/awful/screen.lua +++ b/lib/awful/screen.lua @@ -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.