[pygtk] Problem with leave_notify_event

Gary Jaffe gfj555 at gmail.com
Sun Jan 20 00:05:47 WST 2008


Hi All --

I have a transient window that contains a gtk.ScrolledWindow, and the 
gtk.ScrolledWindow contains a gtk.TreeView.  I need to know when the 
pointer leaves the window.

So I did

window.add_events(gtk.gdk.LEAVE_NOTIFY_MASK)
window.connect("leave_notify_event", self.shrink)

This works.  When the pointer leaves the window, self.shrink gets called.

But self.shrink also gets called when the pointer goes from the 
gtk.TreeView to the scrollbar, which is still inside the window. 
Nothing else is calling self.shrink.  Is there something special I have 
to do to get the leave_notify_event to trigger only when the pointer 
leaves the window and not when it leaves the gtk.TreeView but stays 
inside the window?

Gary


More information about the pygtk mailing list