When using sticky windows, they get preferential focus treatment when changing workspaces even if they do not belong on the head where the cursor currently is.
A scenario:
0. two heads, x (>=2) workspaces, one sticky window on the right head, there are windows on each other workspace on the left head (all maximised for simplicity)
1. on workspace 2, I focus the window on the left head
2. I switch to workspace 1, focus the sticky window, then focus windows on the left head
3. with cursor and focus on the left head, I switch to workspace 2
At this point I would like any of these to get focus (they make sense one way or another):
- the window my cursor is pointing at after I switch the workspace (applying sloppy focus)
- the last one focussed when I was on that workspace (remembers what I did)
- one that is on the same head my cursor is at (or the focussed window was before I switched the workspace) - keeps the notion of active head
Instead, the sticky window on the right head gets focussed, which is not the one I'm looking at.
Some information requested from ak|ra on the IRC channel:
- fluxbox -version returns "Fluxbox 1.3.5 : (c) 2001-2011 Fluxbox Team", this is Debian Jessie
- "fluxbox -info | grep XIN" returns XINERAMA
- this is two monitors set up with "xrandr --output HDMI-0 --auto --output DVI-0 --auto --primary --left-of HDMI-0"
just to repeat what we discussed in irc:
FocusControl::lastFocusedWindow() is used to select the new window, see http://git.fluxbox.org/fluxbox.git/tree/src/FocusControl.cc#n502
a sticky window was propably focussed on the other workspace before and thus the chance of it being selected is pretty high.