> If your widget has a window (ie. not a label or other simple widget), you
> should be able to look at the pointer attribute of its GdkWindow:
> x,y = widget.get_window().pointer
>
> This will be relative to the window's top left corner. That is, if the
> pointer is above the window, a negati
If your widget has a window (ie. not a label or other simple widget), you
should be able to look at the pointer attribute of its GdkWindow:
x,y = widget.get_window().pointer
This will be relative to the window's top left corner. That is, if the
pointer is above the window, a negative y value w
Is it possible to obtain the pointer position with pygtk, regardless
of whether it's inside your window or not? The only app I could think
of that does this is XEyes, which I find upon investigation uses
XQueryPointer from Xlib -- is there some kind of analogue/wrapper to
this function in gtk?
T