[Xcb] newby questions regarding the struct, "ButtonState"

Rick Stockton rickstockton at reno-computerhelp.com
Fri Mar 30 17:41:23 PDT 2012


hello. I'm the guy who added support for "more mouse buttons" in Qt5, 
the upcoming Release. On various platforms, the new limits are 27, 16, 
8, 5 ... depending on the platform being used.
On xcb, we'll accept up to 27 buttons (excluding wheel events). Which 
leads me to a pair of newby, simple questions:

(1) Does a ButtonState 'Notify' supply a full-width mask? The struct 
size and layout seems to impoly that it does.

(2) If so: I see a "notify" event, but no Getter method. Is there a way 
than I can acquire the current button mask? If a User (for example, 
using KDE Desktop with the under-Development Kwin/XCB) has buttons 
pressed upon Window Entry; or leaves the Window, Release a held Button, 
and then returns to the Window, I assume that we will not receive a 
NOTIFY. I'd like to do a Request with Response for these cases, can I do 
that?

My thanks to you smarter people, in advance!

- - - - -
The goal is: create a more reliable button-mask within Qt5.1. Right now, 
we try to keep track of pointer button States (turning them on upon 
buttonPressEvent() for xlib, turning them off upon buttonReleaseEvent() 
... but the problem above, (i.e., changes in State which occur outside 
of our event listening Scope) makes it quite unreliable.

And BTW, we've removed xlib support in Qt5, switching to xcb on X11 
platforms. :)


More information about the Xcb mailing list