~3v1n0/compiz/gtk-decorator-finalize-menu-0.9.10

« back to all changes in this revision

Viewing changes to plugins/expo/src/wall_offset/src/wall-offset.cpp

  • Committer: Tarmac
  • Author(s): Chris Townsend
  • Date: 2013-08-26 17:33:56 UTC
  • mfrom: (3781.2.1 compiz-0.9.10)
  • Revision ID: tarmac-20130826173356-g2xwubc1e8ypored
Removed logic in the calculateWallOffset() function in the Expo plugin that only accounted for offsetting the expo animation on the left-most and top-most monitor. Also removed the TestNoOffsetIfOutputIsNotOrigin test since this test is now invalid. Fixes: https://bugs.launchpad.net/bugs/1031710.

Approved by Brandon Schaefer, PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
            worldScaleFactorX = 1.0f;
40
40
            worldScaleFactorY = 1.0f;
41
41
 
42
 
            if (output.left () == 0)
43
 
            {
44
 
                offsetInWorldX = ((vpSize.x () * sx) / ((float) output.width ()) * (offsetInScreenCoords.x ()) * animationProgress);
45
 
                worldScaleFactorX = 1.0f - ((float) (offsetInScreenCoords.x ()) / (float) (output.width ())) * animationProgress;
46
 
            }
 
42
            offsetInWorldX = ((vpSize.x () * sx) / ((float) output.width ()) * (offsetInScreenCoords.x ()) * animationProgress);
 
43
            worldScaleFactorX = 1.0f - ((float) (offsetInScreenCoords.x ()) / (float) (output.width ())) * animationProgress;
47
44
 
48
 
            if (output.top () == 0)
49
 
            {
50
 
                offsetInWorldY = ((vpSize.y () * sy) / ((float) output.height ()) * (offsetInScreenCoords.y ()) * animationProgress);
51
 
                worldScaleFactorY = 1.0f - ((float) (offsetInScreenCoords.y ()) / (float) output.height ()) * animationProgress;
52
 
            }
 
45
            offsetInWorldY = ((vpSize.y () * sy) / ((float) output.height ()) * (offsetInScreenCoords.y ()) * animationProgress);
 
46
            worldScaleFactorY = 1.0f - ((float) (offsetInScreenCoords.y ()) / (float) output.height ()) * animationProgress;
53
47
        }
54
48
    }
55
49
}