The random failure seems to be from winex11 quirk: `fixme:event:wait_for_withdrawn_state window 0x1100ae/7a00005 wait timed out`
Having `wait_for_withdrawn_state` be a no-op fixes it for me but obviously it's there for a reason. Not sure how to relax the tests, this happens because of the SW_SHOW and then SW_HIDE at the top of `test_visibilitychange`, rarely. Retrying until it's actually visible doesn't work, because we can't query X11 compositor from test code (and anyway it wouldn't work with other drivers).
Maybe moving those hide/show after the minimize?