diff options
author | Frédéric Buclin <LpSolit@gmail.com> | 2017-07-31 23:00:21 +0200 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2017-07-31 23:00:21 +0200 |
commit | dde8350b95a8008d3e9166b89dc20cb5ea6dc6b9 (patch) | |
tree | 49be6e10de7ccd0fe842a5bb4a10b399654dff45 /mgaapplet | |
parent | 01b20d34acd6dfde0a0775f31bb69398e697be8c (diff) | |
download | mgaonline-dde8350b95a8008d3e9166b89dc20cb5ea6dc6b9.tar mgaonline-dde8350b95a8008d3e9166b89dc20cb5ea6dc6b9.tar.gz mgaonline-dde8350b95a8008d3e9166b89dc20cb5ea6dc6b9.tar.bz2 mgaonline-dde8350b95a8008d3e9166b89dc20cb5ea6dc6b9.tar.xz mgaonline-dde8350b95a8008d3e9166b89dc20cb5ea6dc6b9.zip |
Make sure to unset the context menu before destroying it (mga#20911)
Diffstat (limited to 'mgaapplet')
-rwxr-xr-x | mgaapplet | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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) { |