Stacking now involves 3 layers: BELOW, NORMAL and ABOVE.
In each layers, floating windows are stacked above tiled windows.
The *stack* function is now extremely simple: it just inserts an item in
a sorted list, relying on *stack_cmp* to compare clients.
Fullscreen windows are no longer special.
Because many clients (e.g. termite) prevent us (maybe unknowingly) from
capturing motion events on their windows, we're forced to create a
window for this sole purpose.
Grabbing the pointer isn't an option, because it forces us to consider
some of the enter notify events we should be ignoring.
It appears that unmapping windows might generate undesirable enter
notify events. It can lead a very nasty bug where the focus constantly
switches between two desktops ad infinitum (cf. #268).
When dialog window shows, I cannot move pointer outside this dialog window
because when I move it, it jumps in window's center (again on dialog).
So, this commit disables pff when mouse focus event happen and enables
after.
- Expand `underlying_monitor` into `monitor_from_client` to avoid
passing a NULL pointer to `translate_client`.
- Remove the `fit_monitor` setting (use the `--center` rule effect
instead).
- Don't remap a window in it's last location (node invisibility would be
the proper way to do this).
- Call `translate_client` after configure requests.
The last desktop and monitor are now deduced from the history.
The stacking order is now independent from the history of the focused
nodes: this prevents hacks on both sides.
All windows are now considered in the stacking algorithm: it prevents
tiled windows from one monitor to appear above the floating windows of
another monitor.
Transfered windows are stacked below the windows of the same kind.
Example: if one chromium window is opened and a link is opened in
newsbeuter then chromium will steal the input focus (without explicitly
requesting focus via the proper EWMH message).