ctrlAltTab: Remove some dead code for a "window" parameter

This isn't set on any item, so we can safely remove it.

https://bugzilla.gnome.org/show_bug.cgi?id=689653
This commit is contained in:
Jasper St. Pierre 2012-12-04 13:48:08 -05:00
parent 7ff7ced504
commit 1f46a0dc26

View File

@ -53,9 +53,7 @@ const CtrlAltTabManager = new Lang.Class({
}, },
focusGroup: function(item, timestamp) { focusGroup: function(item, timestamp) {
if (item.window) { if (item.focusCallback) {
Main.activateWindow(item.window, timestamp);
} else if (item.focusCallback) {
item.focusCallback(timestamp); item.focusCallback(timestamp);
} else { } else {
if (global.stage_input_mode == Shell.StageInputMode.NONREACTIVE || if (global.stage_input_mode == Shell.StageInputMode.NONREACTIVE ||
@ -74,21 +72,11 @@ const CtrlAltTabManager = new Lang.Class({
if (a.sortGroup != b.sortGroup) if (a.sortGroup != b.sortGroup)
return a.sortGroup - b.sortGroup; return a.sortGroup - b.sortGroup;
let y; let ax, bx, y;
if (a.x == undefined) { [ax, y] = a.proxy.get_transformed_position();
if (a.window) [bx, y] = b.proxy.get_transformed_position();
a.x = a.window.get_compositor_private().x;
else
[a.x, y] = a.proxy.get_transformed_position();
}
if (b.x == undefined) {
if (b.window)
b.x = b.window.get_compositor_private().x;
else
[b.x, y] = b.proxy.get_transformed_position();
}
return a.x - b.x; return ax - bx;
}, },
popup: function(backward, binding, mask) { popup: function(backward, binding, mask) {