Skip to content

xi: Fix touch ownership handling during grabs

Povilas Kanapickas requested to merge p12tic/xserver:fix-touch-ownership into master

98e3db2a broke XI_TouchOwnership handling during active pointer grabs. The clients that selected XI_TouchOwnership should get other touch events too, but right now we don't send any.

The fix is to limit the grab check only to the emulated events themselves, as that's what creates the crash 98e3db2a attempted to fix.

This MR fixes the following tests from xorg-integration-tests:

  • TouchOwnershipTest.ActivateGrabOwnershipAcceptTouch
  • TouchOwnershipTest.ActivateGrabOwnershipRejectTouch
  • TouchOwnershipTest.ActivateGrabOwnershipUngrabDevice
  • TouchGrabTest.DeviceGrabDeactivationReplayEmulatedEvents (new test that reproduces the exact crash that was fixed by 98e3db2a). This test has been added in xorg/test/xorg-integration-tests!13 (merged).

cc @whot

Edited by Povilas Kanapickas

Merge request reports