Skip to content

Commit

Permalink
When opening the right-click menu, remove reactiveness of icons.
Browse files Browse the repository at this point in the history
  • Loading branch information
franglais125 committed Sep 6, 2017
1 parent 4249938 commit eeb066b
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions dash.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,16 @@ var MyDash = new Lang.Class({

this._container.add_actor(this._showAppsIcon);

// When opening the right click menu, deactivate reactiveness of icons.
this._containerObject.menu.connect('open-state-changed', Lang.bind(this, function() {
let reactiveness = !this._containerObject.menu.isOpen;
let appIcons = this._getAppIcons();
appIcons.forEach(function(icon) {
icon.actor.reactive = reactiveness;
});
showAppsIconWrapper.actor.reactive = reactiveness;
}));

let rtl = Clutter.get_default_text_direction() == Clutter.TextDirection.RTL;
this.actor = new St.Bin({
child: this._container,
Expand Down Expand Up @@ -600,10 +610,6 @@ var MyDash = new Lang.Class({
}

item.hideLabel();

// We need to close the dash menu if it's open
if (this._containerObject.menu.isOpen)
this._containerObject.menu.toggle();
}
else {
// I want to listen from outside when a menu is closed. I used to
Expand Down

0 comments on commit eeb066b

Please sign in to comment.