[gnome-shell] popupMenu: Connect after to item 'activate' signal



commit 759120b95fd8cff4f76cceeeeadc404ae51c352d
Author: Marco Trevisan (Treviño) <mail 3v1n0 net>
Date:   Mon May 27 14:45:12 2019 -0500

    popupMenu: Connect after to item 'activate' signal
    
    A menu item activation might lead to a call to `itemActivated` which eventually
    will close the menu which leads to a `PopupMenu.removeAll` that destroys all the
    items, stopping the emission of the 'activate' signal for them.
    
    Before commit 4258ae3e this was not happening because destroy'ing a javascript
    object wasn't really disposing it and thus stopping the signal emissions.
    
    So, ensure that `itemActivated` is called after that all the other callbacks
    have been consumed, and so that the menu is closed as last thing.
    
    Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/1326
    
    https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/557

 js/ui/popupMenu.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js
index 90319accc..305438e47 100644
--- a/js/ui/popupMenu.js
+++ b/js/ui/popupMenu.js
@@ -572,7 +572,7 @@ var PopupMenuBase = class {
                     menuItem.actor.grab_key_focus();
             }
         });
-        menuItem._activateId = menuItem.connect('activate', (menuItem, event) => {
+        menuItem._activateId = menuItem.connect_after('activate', (menuItem, event) => {
             this.emit('activate', menuItem);
             this.itemActivated(BoxPointer.PopupAnimation.FULL);
         });


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]