popupMenu: Display the proper animations for popup menus

BoxPointer's API changed to take a BoxPointer.PopupAnimation
enumeration value, but the code was accidentally replaced with
older code when porting the PopupMenuManager code to GrabHelper.

https://bugzilla.gnome.org/show_bug.cgi?id=689954
This commit is contained in:
Jasper St. Pierre 2012-12-10 03:47:32 -05:00
parent 13a2b28bf1
commit ca2ee22827

View File

@ -2133,11 +2133,12 @@ const PopupMenuManager = new Lang.Class({
}, },
_changeMenu: function(newMenu) { _changeMenu: function(newMenu) {
if (this.activeMenu) { let oldMenu = this.activeMenu;
this._closeMenu(this.activeMenu); if (oldMenu) {
newMenu.open(false); oldMenu.close(BoxPointer.PopupAnimation.FADE);
newMenu.open(BoxPointer.PopupAnimation.FADE);
} else { } else {
newMenu.open(true); newMenu.open(BoxPointer.PopupAnimation.FULL);
} }
}, },