frames: Select SubstructureNotifyMask too

This is the mask that lets us receive among other events the rather
important CreateNotify, that tells us about new winows. This has went by
rather unnoticed except for cases where multiple windows show up very
quickly directly after the frames client spawned, because the drag icon
surface cache eventually already did select that particular mask.

Make things more reliably by explicitly setting the mask for the events
we rely on to function.

This fixes flaky stacking tests that map multiple X11 windows in a row.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2894>
This commit is contained in:
Jonas Ådahl 2023-03-04 23:52:57 +01:00 committed by Marge Bot
parent a9c9b89358
commit af9a7741f4

View File

@ -340,7 +340,8 @@ meta_window_tracker_constructed (GObject *object)
XSelectInput (xdisplay, xroot,
KeyPressMask |
PropertyChangeMask);
PropertyChangeMask |
SubstructureNotifyMask);
g_signal_connect (display, "xevent",
G_CALLBACK (on_xevent), object);