diff --git a/extensions/apps-menu/extension.js b/extensions/apps-menu/extension.js index 8e6a4a22..a822d446 100644 --- a/extensions/apps-menu/extension.js +++ b/extensions/apps-menu/extension.js @@ -227,24 +227,23 @@ const ApplicationsMenu = new Lang.Class({ Name: 'ApplicationsMenu', Extends: PopupMenu.PopupMenu, - _init: function(sourceActor, arrowAlignment, arrowSide, button, hotCorner) { + _init: function(sourceActor, arrowAlignment, arrowSide, button) { this.parent(sourceActor, arrowAlignment, arrowSide); this._button = button; - this._hotCorner = hotCorner; }, open: function(animate) { - this._hotCorner.setBarrierSize(0); - if (this._hotCorner.actor) // fallback corner - this._hotCorner.actor.hide(); + this._button.hotCorner.setBarrierSize(0); + if (this._button.hotCorner.actor) // fallback corner + this._button.hotCorner.actor.hide(); this.parent(animate); }, close: function(animate) { let size = Main.layoutManager.panelBox.height; - this._hotCorner.setBarrierSize(size); - if (this._hotCorner.actor) // fallback corner - this._hotCorner.actor.show(); + this._button.hotCorner.setBarrierSize(size); + if (this._button.hotCorner.actor) // fallback corner + this._button.hotCorner.actor.show(); this.parent(animate); }, @@ -265,9 +264,8 @@ const ApplicationsButton = new Lang.Class({ _init: function() { this.parent(1.0, null, false); - this._hotCorner = Main.layoutManager.hotCorners[Main.layoutManager.primaryIndex]; - this.setMenu(new ApplicationsMenu(this.actor, 1.0, St.Side.TOP, this, this._hotCorner)); + this.setMenu(new ApplicationsMenu(this.actor, 1.0, St.Side.TOP, this)); Main.panel.menuManager.addMenu(this.menu); // At this moment applications menu is not keyboard navigable at @@ -310,6 +308,10 @@ const ApplicationsButton = new Lang.Class({ })); }, + get hotCorner() { + return Main.layoutManager.hotCorners[Main.layoutManager.primaryIndex]; + }, + _createVertSeparator: function() { let separator = new St.DrawingArea({ style_class: 'calendar-vertical-separator', pseudo_class: 'highlighted' });