Skip to content

backends/x11: Don't set the stage on crossing events during implicit grabs

On x11 we emulate pointer events from touch events as long as there's only one touchpoint on screen, this obviously leads to x11 sending us crossing events triggered by the emulated pointer. Now if we get a leave event and set the stage of the ClutterInputDevice to NULL, new touch events will be discarded by clutters backend because the core pointer doesn't have a stage associated. This means Mutter completely loses state of a touchpoint as soon as it crosses a shell actor.

An easy reproducer for this issue is to start the four-finger-workspace gesture above a window and to move the pointer emulating touch outside of the window, this will freeze the gesture as the gesture no longer receives touch events.

To fix this, stop tracking stage changes on crossing events and simply leave the ClutterInputDevice stage as-is. In our case there is only one stage anyway and that won't change in the future.

Edited by Jonas Dreßler

Merge request reports