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 <barlik@zoho.com>
This commit is contained in:
Rastislav Barlik 2015-05-19 01:21:03 +01:00 committed by Daniel Hahler
parent 496fce0f90
commit eb7fba2657
1 changed files with 9 additions and 1 deletions

View File

@ -262,7 +262,15 @@ globalkeys = awful.util.table.join(
awful.key({ modkey, }, "space", function () awful.layout.inc( 1) end), awful.key({ modkey, }, "space", function () awful.layout.inc( 1) end),
awful.key({ modkey, "Shift" }, "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 -- Prompt
awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end), awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end),