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 will be returned.

James.

--
Email: [EMAIL PROTECTED]
WWW:   http://www.daa.com.au/~james/


On Tue, 2 Nov 1999, Rob Hodges wrote:

> 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?
> 
> Thanks,
> -Rob
> 
> To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
> 

To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]

Reply via email to