Gtk3 sends map/map_event even when popup is not shown by compositor
This is a follow up from https://bugzilla.mozilla.org/show_bug.cgi?id=1709254 / mutter#1768 (closed)
When compositor refuses to show a popup, Gtk still sends map/map_event signals and claims popup widget as mapped. When another popup is created over it (a tooltip for instance) it leads to application crash due to 'invalid parent error'.
This is very easily reproducible with move-to-rect:
- create popup
- position it by move-to-rect, place anchor outside of parent window (say a rectangle -20, -20, 10, 10).
- show the popup
- Gtk says it's visible but mutter silently refuses to show it