Bug 36146

Summary: XI2 SD button grabs broken on 1.10.0.902
Product: xorg Reporter: Tom Jaeger <ThJaeger>
Component: Server/Input/CoreAssignee: Peter Hutterer <peter.hutterer>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium CC: chase.douglas, jeremyhu, peter.hutterer, ThJaeger
Version: unspecified   
Hardware: Other   
OS: All   
URL: http://cgit.freedesktop.org/xorg/xserver/commit/?h=9d23459415b84606ee4f38bb2d19054c432c8552
See Also: http://bugs.freedesktop.org/show_bug.cgi?id=34182
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 31018    
Attachments:
Description Flags
test case
none
0001-input-Only-release-SD-buttons-for-explicit-floating-.patch none

Description Tom Jaeger 2011-04-11 22:26:43 UTC
Created attachment 45497 [details]
test case

I tested this using ubuntu's xorg-server packages; apologies if the bug is not present in the upstream code.

XI2 Button grabs don't seem to work right anymore: Upon releasing the button, no release event is sent and the grab remains in effect; pressing and releasing the button again, however, does results in both the press and release being reported and the grab being released.  (Trivial) test case is attached.
Comment 1 Harald Judt 2011-04-12 06:10:59 UTC
Confirmed, and it seems this still does not work correctly in current git (7aad7dbf409eaa16a2c80d76ba2a42dc84501919).
Comment 2 Peter Hutterer 2011-04-13 22:01:38 UTC
Had a quick test against 7aad7dbf409eaa16a2c80d76ba2a42dc84501919 and I see press/release event as I click/release the mouse. What else is necessary?
Comment 3 Chase Douglas 2011-04-14 08:53:11 UTC
I am able to reproduce the issue on Ubuntu Natty. Reverting 81fbb96c54f78a7cd96433294ee003c7ef6a772a (9d23459415b84606ee4f38bb2d19054c432c8552 on master) fixes the issue.

The change calls the new ReleaseButtonsAndKeys() function in AttachDevice(). This makes sense when you are wanting to float a device. However, activating a passive grab on a slave device also floats the device. In this case, ReleaseButtonsAndKeys() is interfering with the passive grab.
Comment 4 Jeremy Huddleston Sequoia 2011-04-14 10:28:06 UTC
I plan on reverting 81fbb96c54f78a7cd96433294ee003c7ef6a772a in xserver-1.10-branch for 1.10.1 unless a low-risk fix can be found for this today.
Comment 5 Peter Hutterer 2011-04-14 21:25:28 UTC
Created attachment 45648 [details] [review]
0001-input-Only-release-SD-buttons-for-explicit-floating-.patch

how about this patch? Reverts to old behaviour but still releases the buttons on floating/reattaching devices.
Comment 6 Jeremy Huddleston Sequoia 2011-05-28 18:13:19 UTC
This (and associated regressions) are all fixed (albeit hackishly) now in both master and server-1.10-branch, right?
Comment 7 Jeremy Huddleston Sequoia 2011-06-20 00:33:46 UTC
in server-1.10-branch and will be in 1.10.3 RC2

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.