[gnome-shell] [AppWell] Enable lightboxing immediately on popup
- From: Colin Walters <walters src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-shell] [AppWell] Enable lightboxing immediately on popup
- Date: Wed, 9 Sep 2009 20:21:40 +0000 (UTC)
commit 05812ef7f94de1cf5f9874554225ec9d310ccd48
Author: Colin Walters <walters verbum org>
Date: Tue Sep 8 18:34:04 2009 -0400
[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
js/ui/appDisplay.js | 2 +-
js/ui/overview.js | 14 ++++++++------
js/ui/workspaces.js | 27 ++++++++++++---------------
3 files changed, 21 insertions(+), 22 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index e806f61..8af04a8 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -791,7 +791,7 @@ RunningWellItem.prototype = {
id = this.appInfo.get_id();
else
id = null;
- Main.overview.setWindowApplicationFilter(id);
+ Main.overview.beginApplicationWindowSelection(id);
}));
}
diff --git a/js/ui/overview.js b/js/ui/overview.js
index 3100893..1747da2 100644
--- a/js/ui/overview.js
+++ b/js/ui/overview.js
@@ -397,16 +397,18 @@ Overview.prototype = {
this._workspaces.setHighlightWindow(metaWindow);
},
+
/**
- * setWindowApplicationFilter:
- * @id: A string application identifier
+ * beginApplicationWindowSelection:
+ * @appid: Application identifier string
*
- * Hide all windows which are not owned by the application
- * identified by @id.
+ * Enter a mode which shows only the widnows owned by the
+ * given application, and allow highlighting of a specific
+ * window with setHighlightWindow().
*/
- setWindowApplicationFilter: function (id) {
+ beginApplicationWindowSelection: function (appid) {
if (this._workspaces)
- this._workspaces.setWindowApplicationFilter(id);
+ this._workspaces.beginApplicationWindowSelection(appid);
},
//// Private methods ////
diff --git a/js/ui/workspaces.js b/js/ui/workspaces.js
index 07a7fc7..a770747 100644
--- a/js/ui/workspaces.js
+++ b/js/ui/workspaces.js
@@ -130,17 +130,6 @@ WindowClone.prototype = {
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) {
if (visible) {
this.actor.show();
@@ -568,11 +557,19 @@ Workspace.prototype = {
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) {
- if (showLightbox)
+ if (showLightbox) {
+ this.setHighlightWindow(null);
this._lightbox.show();
- else
+ } else {
this._lightbox.hide();
+ }
},
setHighlightWindow: function (metaWindow) {
@@ -1153,7 +1150,6 @@ Workspaces.prototype = {
// highlighted window while trying to handle the window or workspace possibly
// going away.
for (let i = 0; i < this._workspaces.length; i++) {
- this._workspaces[i].setLightboxMode(metaWindow != null);
this._workspaces[i].setHighlightWindow(null);
}
if (metaWindow != null) {
@@ -1162,7 +1158,7 @@ Workspaces.prototype = {
}
},
- setWindowApplicationFilter: function (appId) {
+ beginApplicationWindowSelection: function (appId) {
let appSys = Shell.AppMonitor.get_default();
let showOnlyWindows;
@@ -1177,6 +1173,7 @@ Workspaces.prototype = {
}
this._appIdFilter = appId;
for (let i = 0; i < this._workspaces.length; i++) {
+ this._workspaces[i].setLightboxMode(showOnlyWindows != null);
this._workspaces[i].setShowOnlyWindows(showOnlyWindows);
}
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]