summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2017-07-31 23:10:44 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2017-07-31 23:10:44 +0200
commitb64c450507d22ac74bcadd7faffbb4c1cd588424 (patch)
treea2c6e8dd9f3a32e914199c56d1fc02c5d4bdd5e2
parent01b20d34acd6dfde0a0775f31bb69398e697be8c (diff)
downloadmgaonline-b64c450507d22ac74bcadd7faffbb4c1cd588424.tar
mgaonline-b64c450507d22ac74bcadd7faffbb4c1cd588424.tar.gz
mgaonline-b64c450507d22ac74bcadd7faffbb4c1cd588424.tar.bz2
mgaonline-b64c450507d22ac74bcadd7faffbb4c1cd588424.tar.xz
mgaonline-b64c450507d22ac74bcadd7faffbb4c1cd588424.zip
Make sure to unset the context menu before destroying it (mga#20911)
-rw-r--r--NEWS2
-rwxr-xr-xmgaapplet5
2 files changed, 5 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 44e1bf47..8cd05606 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+- fix the context menu in mgaapplet
+
Version 3.24 - 7 July 2017, Thomas Backlund
- translation updates
diff --git a/mgaapplet b/mgaapplet
index 8b79e045..48fca0d4 100755
--- a/mgaapplet
+++ b/mgaapplet
@@ -233,8 +233,7 @@ go2State('delayed');
# seems to be some latency with DBus and/or DBusMenu, and when this method
# is called too early, it seems to be blocked. So we add a timer here to call
# it again to make sure that right-click events will be correctly handled by
-# DBusMenu. If the registration fails again, then the 'context_menu' signal
-# will be emitted and caught above (mga#20540).
+# DBusMenu.
Glib::Timeout->add(100, sub { $icon->set_context_menu($menu); 0 }) if $is_plasma;
Glib::Timeout->add_seconds(1, sub {
@@ -735,6 +734,8 @@ sub go2State {
warn ">> ERR:$@" if $@;
}
+ # Unset the context menu before destroying it.
+ $icon->set_context_menu() if $is_plasma;
$menu->destroy if $menu;
$menu = Gtk3::Menu->new;
foreach (@arr) {