Bug 36146 - XI2 SD button grabs broken on
Summary: XI2 SD button grabs broken on
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/Input/Core (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Peter Hutterer
QA Contact: Xorg Project Team
URL: http://cgit.freedesktop.org/xorg/xser...
Depends on:
Blocks: xserver-1.10
  Show dependency treegraph
Reported: 2011-04-11 22:26 UTC by Tom Jaeger
Modified: 2011-06-20 00:33 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:

test case (1.31 KB, text/x-csrc)
2011-04-11 22:26 UTC, Tom Jaeger
no flags Details
0001-input-Only-release-SD-buttons-for-explicit-floating-.patch (2.50 KB, patch)
2011-04-14 21:25 UTC, Peter Hutterer
no flags Details | Splinter Review

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]

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.