popupMenu: Treat a menu will all invisible menu items as empty
As an example, a menu that has only settings actions might be "empty" if allowSettings is false. https://bugzilla.gnome.org/show_bug.cgi?id=681540
This commit is contained in:
parent
498bc21133
commit
30179bb60d
@ -914,7 +914,11 @@ const PopupMenuBase = new Lang.Class({
|
||||
},
|
||||
|
||||
isEmpty: function() {
|
||||
return this.box.get_n_children() == 0;
|
||||
let hasVisibleChildren = this.box.get_children().some(function(child) {
|
||||
return child.visible;
|
||||
});
|
||||
|
||||
return !hasVisibleChildren;
|
||||
},
|
||||
|
||||
isChildMenu: function(menu) {
|
||||
|
Loading…
Reference in New Issue
Block a user