Fix stacking tests
Stacking tests are broken on master and/or when using the gtk-3-22 branch.
There are two issues:
-
The synchronization mechanism making sure a window is shown had stopped working. The reason for this is that it depended on the 'after-paint' gdk frame clock being triggered after paint, which is not the case anymore in gtk, as it is also triggered for a no-op frame before the initial configure event.
-
There was a regression in a override-redirect test from 2017 which fixed another override-redirect bug. In effect, it always sorted override redirect windows on top even if they were hidden (i.e. behind the guard window)