Comment 4 for bug 1171433

Revision history for this message
Viktor Suprun (popsul1993) wrote :

Hello again. During the time while I waited an answer about this issue I found temporary solution for solve it problem.
Attached example has contains a following part of the code:

def on_button_press(w, event):
    if event.button == 3:
        menu = Menu()
        menu.add(Gtk.MenuItem("item 1"))
        menu.show_all()
        menu.popup(None, None, lambda menu, data: (event.get_root_coords()[0], event.get_root_coords()[1], True), None, event.button, event.time)

But if it is rewritten so:

menu = Menu()
def on_button_press(w, event):
    if event.button == 3:
        menu.add(Gtk.MenuItem("item 1"))
        menu.show_all()
        menu.popup(None, None, None, None, event.button, event.time)

menu works perfectly without any bugs.
So, I think it's a bug because first example works with version 3.4 of the gir1.2-gtk-3.0 package, but, with version 3.6+ menu doesn't work.