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 7298b3835d
commit c0dffca646
1 changed files with 4 additions and 6 deletions

View File

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