From eb7fba2657c836fefa9766572d0f4f5442cff3ac Mon Sep 17 00:00:00 2001 From: Rastislav Barlik Date: Tue, 19 May 2015 01:21:03 +0100 Subject: [PATCH] Give focus to restored clients When you are restoring previously minimized windows, you definetely want focus on them. Closes: https://github.com/awesomeWM/awesome/pull/234. Signed-off-by: Rastislav Barlik --- awesomerc.lua.in | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/awesomerc.lua.in b/awesomerc.lua.in index c1ec82ac..cbe2ba56 100755 --- a/awesomerc.lua.in +++ b/awesomerc.lua.in @@ -262,7 +262,15 @@ globalkeys = awful.util.table.join( awful.key({ modkey, }, "space", function () awful.layout.inc( 1) end), awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(-1) end), - awful.key({ modkey, "Control" }, "n", awful.client.restore), + awful.key({ modkey, "Control" }, "n", + function () + c = awful.client.restore() + -- Focus restored client + if c then + client.focus = c + c:raise() + end + end), -- Prompt awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end),