Hi!
I've got a small program that maps keyboard-events to mousebuttons.
To summarize, the program uses
XGrabButton(disp,
button,
AnyModifier,
DefaultRootWindow(disp),
False,
ButtonPressMask | ButtonReleaseMask,
GrabModeAsync,
GrabModeAsync,
None,
None);
to grab the button(s) and then uses
XNextEvent(disp, &event);
in an endless loop to wait for the grabbed mousebutton events.
For simple things, this works fine, but as soon as you push the grabbed
mousebutton, hold it and push a second mousebutton, XNextEvent gets the
second event and I don't know what to do with it.
So my questions:
- XNextEvent gets all events that match ButtonPressMask | ButtonReleaseMask,
it seems that if you press the grabbed button, presses on other buttons also
match this mask (why?) is there a way to prevent XNextEvent from getting any
presses on other buttons?
- How do you prevent XNextEvent from getting the event or how do you forward
unwanted events to the X server?
Thanks a lot,
Roland
--
Every successful person has had failures but repeated failure is no
guarantee of eventual success.
_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert