A mouse wheel motion generates two button events, a button press followed by a button release (button numbers 4 and 5). Because mouse wheel events are button events they trigger the "default button grab" code located in events.c:DeliverEventsToWindow. Due to the following code, a mouse wheel button press events activates a grab and then the following button release event deactivates it. This constant grabbing and ungrabbing of the pointer device happens every time one uses the mouse wheel. This grabbing seems to me to be gratuitous. if ((type == ButtonPress) && deliveries && (!grab)) { <Construct a temporary grab object and activate it> } Suggested fix: I recommend that this code be modified to ignore mouse wheel ButtonPress events and not allow them to activate a grab. Here is an example: if ((type == ButtonPress) && deliveries && (!grab) && pEvents->u.u.detail < 4) { ... }
For the record: Hard coded button 1-3 (pEvents->u.u.detail < 4) is clearly wrong (see discussion on xorg mailing list).
Sorry about the phenomenal bug spam, guys. Adding xorg-team@ to the QA contact so bugs don't get lost in future.
strictly speaking, buttons 4 5 6 7 aren't anything special in the server. They are used as scroll buttons by convention, both in the driver and in the clients. the server doesn't care either way. the purpose of the implicit passive grab for buttons is to deliver the release event to the same window/client that got the press events - presumably to avoid stuck buttons. Does activating the grab have a real performance impact here? Seems to me that in most cases that include scrolling the rendering of the application has a higher performance impact than the grab. I'm closing this as WONTFIX for now. Please feel free to re-open if you think this is a real issue that needs to be addressed.
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.