Fix random CI failures
This is an attempt at fixing random failures seen in some tests, most prominently
stacking/closed-transient-no-input-parent-delayed-focus-default-cancelled, causing the CI pipeline to fail in completely unrelated MRs. There are some timing/synchronization related issues with these tests and also a small bug in the mutter X11 focus code that outside of one specific test probably has no real world impact. With the MR applied I was able to run 5000 repeats (some under heavy load) of
stacking/closed-transient-no-input-parent-delayed-focus-default-cancelled locally without it failing once.