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.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1171433

Title:
  Popup menu doesn't work

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gobject-introspection/+bug/1171433/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to