[gnome-shell] Remove taskbar-highlighting support from Alt-Tab popup
- From: Dan Winship <danw src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-shell] Remove taskbar-highlighting support from Alt-Tab popup
- Date: Fri, 18 Sep 2009 12:23:22 +0000 (UTC)
commit e79b15c645148c75cb02eb766108534bb8890bae
Author: Dan Winship <danw gnome org>
Date: Tue Sep 15 21:26:11 2009 -0400
Remove taskbar-highlighting support from Alt-Tab popup
The "lightbox" effect had support for highlighting a particular
rectangular region on the taskbar when Alt-Tabbing to a minimized
window. Since we no longer use the taskbar, this code is just cruft
now.
Part of https://bugzilla.gnome.org/show_bug.cgi?id=590563
js/ui/altTab.js | 87 ++++++------------------------------------------------
1 files changed, 10 insertions(+), 77 deletions(-)
---
diff --git a/js/ui/altTab.js b/js/ui/altTab.js
index 3dfcac6..206292a 100644
--- a/js/ui/altTab.js
+++ b/js/ui/altTab.js
@@ -78,22 +78,14 @@ AltTabPopup.prototype = {
global.stage.add_actor(this.actor);
// Dark translucent window used to cover all but the
- // currently-selected window while Alt-Tabbing. Actually
- // contains four actors which can we rearrange to create
- // a hole in the overlay.
- this._overlay = new Clutter.Group({ reactive: true });
- this._overlay_top = new Clutter.Rectangle({ color: OVERLAY_COLOR,
- border_width: 0 });
- this._overlay_bottom = new Clutter.Rectangle({ color: OVERLAY_COLOR,
- border_width: 0 });
- this._overlay_left = new Clutter.Rectangle({ color: OVERLAY_COLOR,
- border_width: 0 });
- this._overlay_right = new Clutter.Rectangle({ color: OVERLAY_COLOR,
- border_width: 0 });
- this._overlay.add_actor(this._overlay_top);
- this._overlay.add_actor(this._overlay_bottom);
- this._overlay.add_actor(this._overlay_left);
- this._overlay.add_actor(this._overlay_right);
+ // currently-selected window while Alt-Tabbing.
+ this._overlay = new Clutter.Rectangle({ color: OVERLAY_COLOR,
+ x: 0,
+ y: 0,
+ width: global.screen_width,
+ height: global.screen_height,
+ border_width: 0,
+ reactive: true });
},
addWindow : function(win) {
@@ -117,14 +109,6 @@ AltTabPopup.prototype = {
}
}
- item.visible = item.metaWindow.showing_on_its_workspace();
-
- if (!item.visible) {
- let rect = new Meta.Rectangle();
- if (item.metaWindow.get_icon_geometry(rect))
- item.icon_rect = rect;
- }
-
item.n = this._items.length;
this._items.push(item);
@@ -209,11 +193,8 @@ AltTabPopup.prototype = {
}
this._indicator.show();
- if (this._overlay.visible) {
- if (this._selected.visible)
- this._selected.window.raise(this._overlay);
- this._adjust_overlay();
- }
+ if (this._overlay.visible)
+ this._selected.window.raise(this._overlay);
this._allocationChangedId =
this._selected.box.connect('notify::allocation',
@@ -227,53 +208,5 @@ AltTabPopup.prototype = {
_allocationChanged : function() {
if (this._selected)
this.select(this._selected.n);
- },
-
- _adjust_overlay : function() {
- if (this._selected && this._selected.icon_rect) {
- // We want to highlight a specific rectangle within the
- // task bar, so rearrange the pieces of the overlay to
- // cover the whole screen except that rectangle
-
- let rect = this._selected.icon_rect;
-
- this._overlay_top.x = 0;
- this._overlay_top.y = 0;
- this._overlay_top.width = global.screen_width;
- this._overlay_top.height = rect.y;
-
- this._overlay_left.x = 0;
- this._overlay_left.y = rect.y;
- this._overlay_left.width = rect.x;
- this._overlay_left.height = rect.height;
- this._overlay_left.show();
-
- this._overlay_right.x = rect.x + rect.width;
- this._overlay_right.y = rect.y;
- this._overlay_right.width = global.screen_width - rect.x - rect.width;
- this._overlay_right.height = rect.height;
- this._overlay_right.show();
-
- this._overlay_bottom.x = 0;
- this._overlay_bottom.y = rect.y + rect.height;
- this._overlay_bottom.width = global.screen_width;
- this._overlay_bottom.height = global.screen_height - rect.y - rect.height;
- this._overlay_bottom.show();
- } else {
- // Either there's no current selection, or the selection
- // is a visible window. Make the overlay cover the whole
- // screen. select() will raise the selected window over
- // the overlay.
-
- this._overlay_top.x = 0;
- this._overlay_top.y = 0;
- this._overlay_top.width = global.screen_width;
- this._overlay_top.height = global.screen_height;
- this._overlay_top.show();
-
- this._overlay_left.hide();
- this._overlay_right.hide();
- this._overlay_bottom.hide();
- }
}
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]