To be honest, I’m not entirely sure where the race condition originates
from, but when making sure that there are no pending events
(which is what sync_with_i3 accomplishes) before warping the pointer, we
have less flaky testsuite runs.
closes#1189
A good visualization of the new algorithm is this:
+--------+
| |
+--------+=| S1 |========================
| | | |
| S0 | +--------+
| | +--------+
+--------+=========| |================
| S2 | +--------+
| | | |
+--------+ | S3 |
| |
+--------+
When focus is on S0, 'focus output right' will first match S1 (the
closest output which overlaps in the highlighted area), then S2, but not
S3 (since S3 does not overlap into the highlighted area).
fixes#669fixes#771