Which window did the event come from?
I am experimenting with making a little widget toolkit in C++ using Xlib/cairo, and I am kind of stuck on how to know which event came from which widget. Every widget object has a window field containing the widget's X window. Some widgets might have multiple X windows (such as the slider, one for the track and one for the thumb).
So basically, is there a way to know what X window the XEvent came from? And what would be the most efficient way of finding the widget to which the X Window belongs to?
|