AppSwitcher: Make sure we always get the correct icon position

Call stage.get_actor_at_pos before calling icon.get_transformed_position.
This commit is contained in:
Adel Gadllah 2010-03-26 18:12:01 +01:00
parent 5ff609ed49
commit 6461db9df6

View File

@ -100,6 +100,8 @@ AltTabPopup.prototype = {
// those calculations
if (this._thumbnails) {
let icon = this._appIcons[this._currentApp].actor;
// Force a stage relayout to make sure we get the correct position
global.stage.get_actor_at_pos(Clutter.PickMode.REACTIVE, 0, 0);
let [posX, posY] = icon.get_transformed_position();
let thumbnailCenter = posX + icon.width / 2;
let [childMinWidth, childNaturalWidth] = this._thumbnails.actor.get_preferred_width(-1);