eaa5fe2
From 3944df1bd24b7295180d33dba9ee7d531c1dddd4 Mon Sep 17 00:00:00 2001
eaa5fe2
From: Maxim Ermilov <zaspire@rambler.ru>
eaa5fe2
Date: Tue, 08 Mar 2011 17:15:20 +0000
eaa5fe2
Subject: altTab: fix incorrect positioning with multiple monitors
eaa5fe2
eaa5fe2
Calculate the position of the alt-tab popup correctly when primary.x != 0.
eaa5fe2
This was accidentally broken by 614176b2691981c982e77b8a04b01ff02a670857
eaa5fe2
https://bugzilla.gnome.org/show_bug.cgi?id=644206
eaa5fe2
---
eaa5fe2
diff --git a/js/ui/altTab.js b/js/ui/altTab.js
eaa5fe2
index 44fd39d..46ab9a3 100644
eaa5fe2
--- a/js/ui/altTab.js
eaa5fe2
+++ b/js/ui/altTab.js
eaa5fe2
@@ -87,7 +87,7 @@ AltTabPopup.prototype = {
eaa5fe2
         let [childMinHeight, childNaturalHeight] = this._appSwitcher.actor.get_preferred_height(primary.width - hPadding);
eaa5fe2
         let [childMinWidth, childNaturalWidth] = this._appSwitcher.actor.get_preferred_width(childNaturalHeight);
eaa5fe2
         childBox.x1 = Math.max(primary.x + leftPadding, primary.x + Math.floor((primary.width - childNaturalWidth) / 2));
eaa5fe2
-        childBox.x2 = Math.min(primary.width - hPadding, childBox.x1 + childNaturalWidth);
eaa5fe2
+        childBox.x2 = Math.min(primary.x + primary.width - hPadding, childBox.x1 + childNaturalWidth);
eaa5fe2
         childBox.y1 = primary.y + Math.floor((primary.height - childNaturalHeight) / 2);
eaa5fe2
         childBox.y2 = childBox.y1 + childNaturalHeight;
eaa5fe2
         this._appSwitcher.actor.allocate(childBox, flags);
eaa5fe2
--
eaa5fe2
cgit v0.8.3.4