From a74cef9d2f74fb6361a1019b2271d5486e2144e8 Mon Sep 17 00:00:00 2001 From: Adel Gadllah Date: Sun, 7 Feb 2010 19:28:35 +0100 Subject: [PATCH] [altTab] Position on the currently focused monitor Show the popup on the currently focused monitor rather than on the primary. https://bugzilla.gnome.org/show_bug.cgi?id=609257 --- js/ui/altTab.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/js/ui/altTab.js b/js/ui/altTab.js index 2a546940d..f7a8269c1 100644 --- a/js/ui/altTab.js +++ b/js/ui/altTab.js @@ -84,9 +84,9 @@ AltTabPopup.prototype = { this._appSwitcher.connect('item-activated', Lang.bind(this, this._appActivated)); this._appSwitcher.connect('item-entered', Lang.bind(this, this._appEntered)); - let primary = global.get_primary_monitor(); - this._appSwitcher.actor.x = primary.x + Math.floor((primary.width - this._appSwitcher.actor.width) / 2); - this._appSwitcher.actor.y = primary.y + Math.floor((primary.height - this._appSwitcher.actor.height) / 2); + let focus = global.get_focus_monitor(); + this._appSwitcher.actor.x = focus.x + Math.floor((focus.width - this._appSwitcher.actor.width) / 2); + this._appSwitcher.actor.y = focus.y + Math.floor((focus.height - this._appSwitcher.actor.height) / 2); this._appIcons = this._appSwitcher.icons; @@ -395,8 +395,8 @@ AltTabPopup.prototype = { thumbnailCenter = stageX + icon.width / 2; } else { // Center the thumbnails on the monitor - let primary = global.get_primary_monitor(); - thumbnailCenter = primary.x + primary.width / 2; + let focus = global.get_focus_monitor(); + thumbnailCenter = focus.x + focus.width / 2; } this._thumbnails.actor.x = Math.floor(thumbnailCenter - this._thumbnails.actor.width / 2);