overview: highlight windows on launcher hover

When in the overview, if you move the mouse cursor over one of the
application launchers in the dash, all the unrelated windows are dimmed
both both in the window view and in the workspace view.

It helps to easily understand whether or not there are already opened
windows for this application, and where they are. It can also help in
differentiating the windows in the overview (sometimes the thumbnails
aren't precise enough to easily know which thumbnail belongs to which
application).

https://bugzilla.gnome.org/show_bug.cgi?id=657315
This commit is contained in:
Stéphane Démurget
2012-11-03 22:18:42 +01:00
parent 95abdeb919
commit 76229a3601
4 changed files with 170 additions and 29 deletions

View File

@ -176,6 +176,8 @@ const Overview = new Lang.Class({
this._modal = false; // have a modal grab
this.animationInProgress = false;
this._hideInProgress = false;
this.hoveredApp = null;
this.primaryAction = false;
// During transitions, we raise this to the top to avoid having the overview
// area be reactive; it causes too many issues such as double clicks on
@ -232,6 +234,9 @@ const Overview = new Lang.Class({
this._group.add_actor(this._searchEntry);
this._dash = new Dash.Dash();
this._dash.connect('hovered-app-changed',
Lang.bind(this, this._hoveredAppChanged));
this._viewSelector = new ViewSelector.ViewSelector(this._searchEntry,
this._dash.showAppsButton);
this._group.add_actor(this._viewSelector.actor);
@ -556,6 +561,12 @@ const Overview = new Lang.Class({
this._viewSelector.actor.set_size(viewWidth, viewHeight);
},
_hoveredAppChanged: function(dash, app, primaryAction) {
this.hoveredApp = app;
this.primaryAction = primaryAction;
this.emit('hovered-app-changed', app, primaryAction);
},
//// Public methods ////
beginItemDrag: function(source) {