Skip to content

Commit

Permalink
gui.topbar: fix args in call to Gtk.Menu.popup
Browse files Browse the repository at this point in the history
The call was missing either the arguments for time or for user data.
Call is now consistent with the other (except for time/button args).

The previous bindings may have been more lenient about missing
parameters, but that has not been the case since at least v1.2.0
going by issue #1099

Not sure if this codepath can even be triggered anymore, but might as
well fix it, in case opening the menu w. keys is made possible again.

Closes #1099
  • Loading branch information
jplloyd committed Aug 16, 2020
1 parent 249b019 commit 83418db
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion gui/topbar.py
Expand Up @@ -257,7 +257,14 @@ def _togglebutton_toggled_cb(self, togglebutton):
if togglebutton.get_active():
if not self.menu.get_property("visible"):
pos_func = self._get_popup_menu_position
self.menu.popup(None, None, pos_func, 1, 0)
self.menu.popup(
parent_menu_shell=None,
parent_menu_item=None,
func=pos_func,
data=None,
button=1,
activate_time=Gdk.CURRENT_TIME,
)

def _menu_dismiss_cb(self, *a, **kw):
"""Reset the button state when the user's finished
Expand Down

0 comments on commit 83418db

Please sign in to comment.