Skip to content

Commit 59aac6e

Browse files
committed
When opening the right-click menu, remove reactiveness of icons.
1 parent c9c537b commit 59aac6e

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

dash.js

+10-4
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,16 @@ const MyDash = new Lang.Class({
286286

287287
this._container.add_actor(this._showAppsIcon);
288288

289+
// When opening the right click menu, deactivate reactiveness of icons.
290+
this._containerObject.menu.connect('open-state-changed', Lang.bind(this, function() {
291+
let reactiveness = !this._containerObject.menu.isOpen;
292+
let appIcons = this._getAppIcons();
293+
appIcons.forEach(function(icon) {
294+
icon.actor.reactive = reactiveness;
295+
});
296+
this._showAppsIcon.actor.reactive = reactiveness;
297+
}));
298+
289299
let rtl = Clutter.get_default_text_direction() == Clutter.TextDirection.RTL;
290300
this.actor = new St.Bin({
291301
child: this._container,
@@ -601,10 +611,6 @@ const MyDash = new Lang.Class({
601611
}
602612

603613
item.hideLabel();
604-
605-
// We need to close the dash menu if it's open
606-
if (this._containerObject.menu.isOpen)
607-
this._containerObject.menu.toggle();
608614
}
609615
else {
610616
// I want to listen from outside when a menu is closed. I used to

0 commit comments

Comments
 (0)