[AppWell] Enable lightboxing immediately on popup
Rather than starting lightboxing only when the mouse enters the menu, start it when an application filter is set. Also delete a stale function in WindowClone from previous work. http://bugzilla.gnome.org/show_bug.cgi?id=594555
This commit is contained in:
parent
a0df412deb
commit
05812ef7f9
@ -791,7 +791,7 @@ RunningWellItem.prototype = {
|
|||||||
id = this.appInfo.get_id();
|
id = this.appInfo.get_id();
|
||||||
else
|
else
|
||||||
id = null;
|
id = null;
|
||||||
Main.overview.setWindowApplicationFilter(id);
|
Main.overview.beginApplicationWindowSelection(id);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -397,16 +397,18 @@ Overview.prototype = {
|
|||||||
this._workspaces.setHighlightWindow(metaWindow);
|
this._workspaces.setHighlightWindow(metaWindow);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setWindowApplicationFilter:
|
* beginApplicationWindowSelection:
|
||||||
* @id: A string application identifier
|
* @appid: Application identifier string
|
||||||
*
|
*
|
||||||
* Hide all windows which are not owned by the application
|
* Enter a mode which shows only the widnows owned by the
|
||||||
* identified by @id.
|
* given application, and allow highlighting of a specific
|
||||||
|
* window with setHighlightWindow().
|
||||||
*/
|
*/
|
||||||
setWindowApplicationFilter: function (id) {
|
beginApplicationWindowSelection: function (appid) {
|
||||||
if (this._workspaces)
|
if (this._workspaces)
|
||||||
this._workspaces.setWindowApplicationFilter(id);
|
this._workspaces.beginApplicationWindowSelection(appid);
|
||||||
},
|
},
|
||||||
|
|
||||||
//// Private methods ////
|
//// Private methods ////
|
||||||
|
@ -130,17 +130,6 @@ WindowClone.prototype = {
|
|||||||
this._inDrag = false;
|
this._inDrag = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
setHighlighted: function (highlighted) {
|
|
||||||
let factor = 0.1;
|
|
||||||
if (highlighted) {
|
|
||||||
this.actor.scale_x += factor;
|
|
||||||
this.actor.scale_y += factor;
|
|
||||||
} else {
|
|
||||||
this.actor.scale_x -= factor;
|
|
||||||
this.actor.scale_y -= factor;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
setVisibleWithChrome: function(visible) {
|
setVisibleWithChrome: function(visible) {
|
||||||
if (visible) {
|
if (visible) {
|
||||||
this.actor.show();
|
this.actor.show();
|
||||||
@ -568,11 +557,19 @@ Workspace.prototype = {
|
|||||||
this.positionWindows(false);
|
this.positionWindows(false);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* setLightboxMode:
|
||||||
|
* @showLightbox: If true, dim background and allow highlighting a specific window
|
||||||
|
*
|
||||||
|
* This function also resets the highlighted window state.
|
||||||
|
*/
|
||||||
setLightboxMode: function (showLightbox) {
|
setLightboxMode: function (showLightbox) {
|
||||||
if (showLightbox)
|
if (showLightbox) {
|
||||||
|
this.setHighlightWindow(null);
|
||||||
this._lightbox.show();
|
this._lightbox.show();
|
||||||
else
|
} else {
|
||||||
this._lightbox.hide();
|
this._lightbox.hide();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
setHighlightWindow: function (metaWindow) {
|
setHighlightWindow: function (metaWindow) {
|
||||||
@ -1153,7 +1150,6 @@ Workspaces.prototype = {
|
|||||||
// highlighted window while trying to handle the window or workspace possibly
|
// highlighted window while trying to handle the window or workspace possibly
|
||||||
// going away.
|
// going away.
|
||||||
for (let i = 0; i < this._workspaces.length; i++) {
|
for (let i = 0; i < this._workspaces.length; i++) {
|
||||||
this._workspaces[i].setLightboxMode(metaWindow != null);
|
|
||||||
this._workspaces[i].setHighlightWindow(null);
|
this._workspaces[i].setHighlightWindow(null);
|
||||||
}
|
}
|
||||||
if (metaWindow != null) {
|
if (metaWindow != null) {
|
||||||
@ -1162,7 +1158,7 @@ Workspaces.prototype = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
setWindowApplicationFilter: function (appId) {
|
beginApplicationWindowSelection: function (appId) {
|
||||||
let appSys = Shell.AppMonitor.get_default();
|
let appSys = Shell.AppMonitor.get_default();
|
||||||
|
|
||||||
let showOnlyWindows;
|
let showOnlyWindows;
|
||||||
@ -1177,6 +1173,7 @@ Workspaces.prototype = {
|
|||||||
}
|
}
|
||||||
this._appIdFilter = appId;
|
this._appIdFilter = appId;
|
||||||
for (let i = 0; i < this._workspaces.length; i++) {
|
for (let i = 0; i < this._workspaces.length; i++) {
|
||||||
|
this._workspaces[i].setLightboxMode(showOnlyWindows != null);
|
||||||
this._workspaces[i].setShowOnlyWindows(showOnlyWindows);
|
this._workspaces[i].setShowOnlyWindows(showOnlyWindows);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user