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
This commit is contained in:
Dan Winship 2009-09-15 21:26:11 -04:00
parent 08603c1524
commit e79b15c645

View File

@ -78,22 +78,14 @@ AltTabPopup.prototype = {
global.stage.add_actor(this.actor); global.stage.add_actor(this.actor);
// Dark translucent window used to cover all but the // Dark translucent window used to cover all but the
// currently-selected window while Alt-Tabbing. Actually // currently-selected window while Alt-Tabbing.
// contains four actors which can we rearrange to create this._overlay = new Clutter.Rectangle({ color: OVERLAY_COLOR,
// a hole in the overlay. x: 0,
this._overlay = new Clutter.Group({ reactive: true }); y: 0,
this._overlay_top = new Clutter.Rectangle({ color: OVERLAY_COLOR, width: global.screen_width,
border_width: 0 }); height: global.screen_height,
this._overlay_bottom = new Clutter.Rectangle({ color: OVERLAY_COLOR, border_width: 0,
border_width: 0 }); reactive: true });
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);
}, },
addWindow : function(win) { 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; item.n = this._items.length;
this._items.push(item); this._items.push(item);
@ -209,11 +193,8 @@ AltTabPopup.prototype = {
} }
this._indicator.show(); this._indicator.show();
if (this._overlay.visible) { if (this._overlay.visible)
if (this._selected.visible)
this._selected.window.raise(this._overlay); this._selected.window.raise(this._overlay);
this._adjust_overlay();
}
this._allocationChangedId = this._allocationChangedId =
this._selected.box.connect('notify::allocation', this._selected.box.connect('notify::allocation',
@ -227,53 +208,5 @@ AltTabPopup.prototype = {
_allocationChanged : function() { _allocationChanged : function() {
if (this._selected) if (this._selected)
this.select(this._selected.n); 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();
}
} }
}; };