Skip to content

Commit

Permalink
altTab: Fix thumbnail size calculation for some dual-head setups
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mgedmin authored and autarkper committed Oct 9, 2012
1 parent 1b0a4cb commit 33408d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/ui/altTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ AltTabPopup.prototype = {
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);
Expand Down

0 comments on commit 33408d1

Please sign in to comment.