Re: [pygtk] How to obtain the pointer position?

1999-11-02 Thread Rob Hodges
> 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

Re: [pygtk] How to obtain the pointer position?

1999-11-01 Thread James Henstridge
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

[pygtk] How to obtain the pointer position?

1999-11-01 Thread Rob Hodges
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