popupMenu: Fix closing submenus when clicking on the expander

We need to make sure that we reset the opened submenu when we close the
submenu, not trick the toplevel into thinking a closed submenu is the
currently opened menu.

https://bugzilla.gnome.org/show_bug.cgi?id=704336
This commit is contained in:
Jasper St. Pierre 2013-07-15 19:38:05 -04:00
parent 5a5b3bf291
commit a2b499c460

View File

@ -1369,12 +1369,13 @@ const PopupSubMenuMenuItem = new Lang.Class({
},
_subMenuOpenStateChanged: function(menu, open) {
if (open)
if (open) {
this.actor.add_style_pseudo_class('open');
else
this._getTopMenu()._setOpenedSubMenu(this.menu);
} else {
this.actor.remove_style_pseudo_class('open');
this._getTopMenu()._setOpenedSubMenu(this.menu);
this._getTopMenu()._setOpenedSubMenu(null);
}
},
destroy: function() {