- A global last_focus_event helps us to determine whether another process
is playing with focus without telling us.
- merge focusin and focusout into a single focusevent, handle focus change
events triggered by synergy.
- Fix focus issues when entering a fullstack window from another region, by
checking to see which ws the focus is coming from before ignoring the
event.
ev->state indicates the state of the buttons and modifier keys, so it's not
just workspace changes but any time these buttons are down. This heuristic
breaks focus with mouse buttons down and when creating new terminals with
m-s-enter, among other things.
This mostly uses the same logic as a normal stack but it detects if the
previous window got unmapped and goes back to the parent. The rest is
the same code as stacked focusing.
Weed out VirtualNotify (switch ws and border crossings) and InferiorNotify
(focus on self, aka touching its own border).
Then check for ConfigureNotify to see if a window is being deleted or moved
to another work space.
This is the smaller hammer for the QLength trick that used to be in there.
If we still have focus issues we need to work those but this is worth
going in.
This win == win->ws->focus check makes scrotwm forget the correct
focus across workspace changes. Unnecessary focus changes are prevented
by the XGetInputFocus() check anyways.
This works reasonably well but all the corner cases now need to be built.
Getting it in because it was becomming unwieldly.
As fas as I know this fixes all use after free issues. It is mean in that
it paints the old entries and has several aborts ready to go when something
bad happens.
Really they are just a bunch of needy children but oh well.
Remove ws->restack since it wasn't used.
Add configreq_win to send syntetic configure requests.
Remove some callbacks that really made no difference (unmap and destroy)
Make XConfigureWindow only be called when necessary.
Fix mplayer that was disapearing after fullscreen.