Welcome to awesome bug tracking system.

FS#574 - sticky windows mess up focus history

Attached to Project: awesome
Opened by koniu (koniu) - Saturday, 08 August 2009, 06:05 GMT
Last edited by Uli Schlachter (psychon) - Tuesday, 16 October 2012, 15:20 GMT
Task Type Bug Report
Category Core
Status New
Assigned To No-one
Operating System All
Severity Medium
Priority Normal
Reported Version git/master
Due in Version 4.0
Due Date Undecided
Percent Complete 0%
Votes 8
Private No


To reproduce:

- open a terminal in tag 1
- open a terminal in tag 2
- open another program on any tag (I used gcolor2)
- mod+x client.focus.sticky = true
- focus terminal in tag 1
- focus terminal in tag 2
- switch between the two tags
- focus always reverts to the sticky client

Tested with default config.

This is not only about sticky windows,  FS#328  describes the same bug with clients having multiple tags.
This task depends upon

Comment by Uli Schlachter (psychon) - Monday, 15 March 2010, 15:33 GMT
 FS#736  is a duplicate of this, it contains a little more info.
Comment by Uli Schlachter (psychon) - Wednesday, 31 March 2010, 06:53 GMT
 FS#753  is another duplicate of this, it proposed to use a callback which would mean that sticky clients never get focus. Not really good either. :/
Comment by David Engster (dengste) - Wednesday, 31 March 2010, 09:02 GMT
I opened this one in  FS#753  as a feature-request, since in  FS#736  'anrxc' says this is not a bug but normal behavior.
As I said in my feature request, I use the patch in , and it works fine for me. However, as an answer to this patch, Julien replies that this should better be solved by a callback. This wouldn't necessarily mean that the client never gets focus, just not automatically.
Comment by Uli Schlachter (psychon) - Friday, 06 July 2012, 15:35 GMT
Another duplicate:  FS#1011 

All kinds of panels (= sticky clients) steal focus as soon as they end up in the focus history.
Comment by Uli Schlachter (psychon) - Wednesday, 23 January 2013, 16:36 GMT
New duplicate:  FS#1095 

Having a client on two tags where each tag also has other clients always focuses said client on tag switches.
Comment by Daniel Hahler (blueyed) - Monday, 25 May 2015, 13:43 GMT
This was mentioned in

> AFAIK the problem is that the focus history (awful.client.focus.history) ignores awful.client.focus.filter and thus a sticky client is always "more recent" in the focus history than clients on another tag.

The problem appears to be 'a sticky client is always "more recent"' in the focus history, which is caused by internals (mentioned in #1095):

> The reason this happens is that on tag switch windows "disappear" one by one and the last one standing wins the input focus. Normally, the focus history papers over this, but in this case it doesn't.

I could imagine a workaround, where switching tags would unset any sticky client attribute, and then restore them after tag switching.

Would that fix this issue?

Otherwise, it might be worthwile/useful to keep track of client history per tag - which might be required anyway, if you want to handle a sticky client different per tag.