mouseevent - How do I properly intercept and forward mouse events with Xlib? -
i'm working on simple xlib program want intercept mouse events (motion, button pressing, button releasing). might want data @ point, right now, want "forward" these mouse events proper windows (as if wasn't intercepting them @ all).
at moment, general approach follows:
- grab pointer root window xgrabpointer()
- upon receiving event, find child window pointer on xquerypointer()
- forward event child window xsendevent()
there more details, basic idea. i've been testing program on ubuntu linux, , seems work in many scenarios (for instance, clicking on minimize, maximize, , close buttons works properly). however, doesn't work in scenarios, such clicking on menu bar items.
in summary, want able intercept mouse events , forward them appropriate windows if hadn't intercepted them @ all. proper way xlib?
Comments
Post a Comment