python - How to determine whether the cursor is inside a gtk.Menu? -
i have gtk.menu
(which being used popup) , need determine whether mouse cursor inside confines of menu.
i can mouse's position on screen using this method. how dimensions , position of menu after calling menu.popup(...)
?
looks didn't close enough @ of methods gtk.menu
provides.
it turns out gtk.menu
descendant of gtk.widget
has method get_window
returns menu's underlying gtk.gdk.window
.
from there, it's matter of calling get_frame_extents()
returns gtk.gdk.rectangle
position , size of menu.
Comments
Post a Comment