Skip to content

Commit a80336b

Browse files
authored
Menu applet: Fix bug where menu is partly behind panel (#11788)
* Fix bug where menu is partly behind panel Call peekPanel() before toggling menu open to ensure menu is positioned correctly. * panel.js: Use better method to determine when panel is visible. this._shouldShow is set to false when mouse leaves auto-hide panel even if panel remains open due to an applet being open so use !this._hidden instead.
1 parent b7f958e commit a80336b

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

files/usr/share/cinnamon/applets/[email protected]/applet.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1318,6 +1318,9 @@ class CinnamonMenuApplet extends Applet.TextIconApplet {
13181318
_updateKeybinding() {
13191319
Main.keybindingManager.addHotKey("overlay-key-" + this.instance_id, this.overlayKey, Lang.bind(this, function() {
13201320
if (!Main.overview.visible && !Main.expo.visible)
1321+
if (this.forceShowPanel && !this.isOpen) {
1322+
this.panel.peekPanel();
1323+
}
13211324
this.menu.toggle_with_options(this.enableAnimation);
13221325
}));
13231326
}
@@ -1495,10 +1498,6 @@ class CinnamonMenuApplet extends Applet.TextIconApplet {
14951498
this._allAppsCategoryButton.actor.style_class = "menu-category-button-selected";
14961499

14971500
Mainloop.idle_add(Lang.bind(this, this._initial_cat_selection, n));
1498-
1499-
if (this.forceShowPanel) {
1500-
this.panel.peekPanel();
1501-
}
15021501
} else {
15031502
this.actor.remove_style_pseudo_class('active');
15041503
if (this.searchActive) {

js/ui/panel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3845,7 +3845,7 @@ Panel.prototype = {
38453845
},
38463846

38473847
getIsVisible: function() {
3848-
return this._shouldShow;
3848+
return !this._hidden;
38493849
},
38503850

38513851
resetDNDZones: function() {

0 commit comments

Comments
 (0)