Skip to content

Commit

Permalink
Menu applet: Fix bug where menu is partly behind panel (#11788)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
fredcw authored Aug 7, 2023
1 parent b7f958e commit a80336b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions files/usr/share/cinnamon/applets/[email protected]/applet.js
Original file line number Diff line number Diff line change
Expand Up @@ -1318,6 +1318,9 @@ class CinnamonMenuApplet extends Applet.TextIconApplet {
_updateKeybinding() {
Main.keybindingManager.addHotKey("overlay-key-" + this.instance_id, this.overlayKey, Lang.bind(this, function() {
if (!Main.overview.visible && !Main.expo.visible)
if (this.forceShowPanel && !this.isOpen) {
this.panel.peekPanel();
}
this.menu.toggle_with_options(this.enableAnimation);
}));
}
Expand Down Expand Up @@ -1495,10 +1498,6 @@ class CinnamonMenuApplet extends Applet.TextIconApplet {
this._allAppsCategoryButton.actor.style_class = "menu-category-button-selected";

Mainloop.idle_add(Lang.bind(this, this._initial_cat_selection, n));

if (this.forceShowPanel) {
this.panel.peekPanel();
}
} else {
this.actor.remove_style_pseudo_class('active');
if (this.searchActive) {
Expand Down
2 changes: 1 addition & 1 deletion js/ui/panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -3845,7 +3845,7 @@ Panel.prototype = {
},

getIsVisible: function() {
return this._shouldShow;
return !this._hidden;
},

resetDNDZones: function() {
Expand Down

0 comments on commit a80336b

Please sign in to comment.