Skip to content

gtk/main: Make coords out of surface when rewriting events for grabs

If a grab is held on a toplevel surface tree, and events happen on a different surface tree from another toplevel/window group, we rewrite these events so they look like generated on the window group that holds the grab, but it missed that coordinates would fail to be translated, so these would stay unchanged and "pointing" to random parts of the toplevel that is holding the grab and handling the events.

If we find this situation, and as it is not possible to translate coordinates between toplevels on some platforms, make it at least sure that the coordinates will be pointing outside the grabbing surface. The grabbing window will still handle the events, but the coordinates in these will be harmlessly moot.

Fixes: #4760 (closed)

Merge request reports