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
Using 'open' will not create an X11 window (while open_window does), so we will
get spurious motion notify events when switching focus, leading to endless loops.