Focus history: Don't ignore unfocusable clients

The only caller of focus.history.add() should be the "focus" signal, so at that
time the unfocusable client already does have the focus. At that point, there is
no reason why this shouldn't be recorded in the focus history.

(And yes, unfocusable clients can be focused. Don't ask.)

This should hopefully fix FS#778.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2012-04-06 12:19:12 +02:00
parent 0cf3da1adc
commit 819daca18c
1 changed files with 4 additions and 6 deletions

View File

@ -140,12 +140,10 @@ end
--- Update client focus history.
-- @param c The client that has been focused.
function focus.history.add(c)
if focus.filter(c) then
-- Remove the client if its in stack
focus.history.delete(c)
-- Record the client has latest focused
table.insert(data.focus, 1, c)
end
-- Remove the client if its in stack
focus.history.delete(c)
-- Record the client has latest focused
table.insert(data.focus, 1, c)
end
--- Get the latest focused client for a screen in history.