From 00ed2973b2d71f2769ef2966cdf60017522a834e Mon Sep 17 00:00:00 2001 From: Marius Gedminas Date: Thu, 23 Feb 2012 20:38:01 +0200 Subject: [PATCH] altTab: Fix thumbnail size calculation for some dual-head setups The old formula worked only when the primary monitor was positioned at the top of the virtual desktop. When that was not the case, the available space was miscalculated sometimes resulting in negative numbers, which in the end produced strangely vertically stretched window thumbnails. https://bugzilla.gnome.org/show_bug.cgi?id=651130 --- js/ui/altTab.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/ui/altTab.js b/js/ui/altTab.js index 85d47924f..25e6db7bb 100644 --- a/js/ui/altTab.js +++ b/js/ui/altTab.js @@ -125,7 +125,7 @@ const AltTabPopup = new Lang.Class({ if (childBox.x2 > primary.x + primary.width - rightPadding) childBox.x2 = primary.x + primary.width - rightPadding; childBox.y1 = this._appSwitcher.actor.allocation.y2 + spacing; - this._thumbnails.addClones(primary.height - bottomPadding - childBox.y1); + this._thumbnails.addClones(primary.y + primary.height - bottomPadding - childBox.y1); let [childMinHeight, childNaturalHeight] = this._thumbnails.actor.get_preferred_height(-1); childBox.y2 = childBox.y1 + childNaturalHeight; this._thumbnails.actor.allocate(childBox, flags);