From 37aad883a6323a433727a4fb2d669312f1d752db Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Tue, 13 Oct 2015 12:02:09 +0200 Subject: [PATCH] awful.client: handle focus history through `manage` on startup After fcccc77 the focus history was not handled correctly any more during restart. Closes https://github.com/awesomeWM/awesome/pull/526. --- lib/awful/client.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/awful/client.lua b/lib/awful/client.lua index 4dbda5d08..6dfec254f 100644 --- a/lib/awful/client.lua +++ b/lib/awful/client.lua @@ -1078,6 +1078,14 @@ capi.client.add_signal("marked") capi.client.add_signal("unmarked") capi.client.connect_signal("focus", client.focus.history.add) +-- Add clients during startup to focus history. +-- This used to happen through ewmh.activate, but that only handles visible +-- clients now. +capi.client.connect_signal("manage", function (c) + if awesome.startup then + client.focus.history.add(c) + end +end) capi.client.connect_signal("unmanage", client.focus.history.delete) capi.client.connect_signal("property::urgent", client.urgent.add)