Hello,
I’m writing a new frontend implementation for GTK3, and the way popup menus are positioned is causing me some grief.
If I understand correctly, the move_to_rect()
callback is called with a rectangle and anchor that determine where to put the menu, relative to the transient_for
window (typically the window that holds the menu bar). That works, and the popup menu appears. However, the popup window’s position is still stored as 0,0 by the GtkWindow
object, and I don’t see where it gets updated. This is a problem since the handling of pointer events relies on comparing absolute screen coordinates with those of the geometry stored by the GtkWindow
object.
For now I’m updating the x and y fields of the GtkWindow
object in the move_to_rect()
callback, but I don’t see other implementations do that.
Thanks,
–Elad