Merge lp:~townsend/compiz/fix-lp1031710 into lp:compiz/0.9.11

Proposed by Christopher Townsend
Status: Merged
Approved by: Francis Ginther
Approved revision: 3784
Merged at revision: 3784
Proposed branch: lp:~townsend/compiz/fix-lp1031710
Merge into: lp:compiz/0.9.11
Diff against target: 60 lines (+4/-34)
2 files modified
plugins/expo/src/wall_offset/src/wall-offset.cpp (+4/-10)
plugins/expo/src/wall_offset/tests/test-expo-wall-offset.cpp (+0/-24)
To merge this branch: bzr merge lp:~townsend/compiz/fix-lp1031710
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
MC Return Approve
Brandon Schaefer (community) Approve
Review via email: mp+181404@code.launchpad.net

Commit message

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.

Description of the change

When viewing the workspace switcher via Expo, the workspace switcher is drawn under the Launcher on non-primary monitors.

This fix removes the logic in the calculateWallOffset() function that only accounts for offsetting the switcher on the primary display. This also removes the TestNoOffsetIfOutputIsNotOrigin test as it's no longer valid with this change.

To post a comment you must log in.
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

LGTM

review: Approve
Revision history for this message
MC Return (mc-return) wrote :

LGTM also.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Christopher Townsend (townsend) wrote :

Weird armhf failure. Try it again...

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Francis Ginther (fginther) wrote :

Found jenkins issue, re-approving.

Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'plugins/expo/src/wall_offset/src/wall-offset.cpp'
--- plugins/expo/src/wall_offset/src/wall-offset.cpp 2013-06-13 21:11:08 +0000
+++ plugins/expo/src/wall_offset/src/wall-offset.cpp 2013-08-21 20:34:32 +0000
@@ -39,17 +39,11 @@
39 worldScaleFactorX = 1.0f;39 worldScaleFactorX = 1.0f;
40 worldScaleFactorY = 1.0f;40 worldScaleFactorY = 1.0f;
4141
42 if (output.left () == 0)42 offsetInWorldX = ((vpSize.x () * sx) / ((float) output.width ()) * (offsetInScreenCoords.x ()) * animationProgress);
43 {43 worldScaleFactorX = 1.0f - ((float) (offsetInScreenCoords.x ()) / (float) (output.width ())) * animationProgress;
44 offsetInWorldX = ((vpSize.x () * sx) / ((float) output.width ()) * (offsetInScreenCoords.x ()) * animationProgress);
45 worldScaleFactorX = 1.0f - ((float) (offsetInScreenCoords.x ()) / (float) (output.width ())) * animationProgress;
46 }
4744
48 if (output.top () == 0)45 offsetInWorldY = ((vpSize.y () * sy) / ((float) output.height ()) * (offsetInScreenCoords.y ()) * animationProgress);
49 {46 worldScaleFactorY = 1.0f - ((float) (offsetInScreenCoords.y ()) / (float) output.height ()) * animationProgress;
50 offsetInWorldY = ((vpSize.y () * sy) / ((float) output.height ()) * (offsetInScreenCoords.y ()) * animationProgress);
51 worldScaleFactorY = 1.0f - ((float) (offsetInScreenCoords.y ()) / (float) output.height ()) * animationProgress;
52 }
53 }47 }
54 }48 }
55}49}
5650
=== modified file 'plugins/expo/src/wall_offset/tests/test-expo-wall-offset.cpp'
--- plugins/expo/src/wall_offset/tests/test-expo-wall-offset.cpp 2012-11-23 09:07:48 +0000
+++ plugins/expo/src/wall_offset/tests/test-expo-wall-offset.cpp 2013-08-21 20:34:32 +0000
@@ -232,30 +232,6 @@
232 EXPECT_FLOAT_EQ (worldScaleFactorY, offset.animationParameters[index].worldScaleFactorY);232 EXPECT_FLOAT_EQ (worldScaleFactorY, offset.animationParameters[index].worldScaleFactorY);
233}233}
234234
235TEST_F (ExpoWallOffsetTest, TestNoOffsetIfOutputIsNotOrigin)
236{
237 compiz::expo::calculateWallOffset (CompRect (1,
238 1,
239 100,
240 100),
241 CompPoint (100,
242 100),
243 CompPoint (1,
244 1),
245 CompSize (100,
246 100),
247 offsetInWorldX,
248 offsetInWorldY,
249 worldScaleFactorX,
250 worldScaleFactorY,
251 1.0);
252
253 EXPECT_FLOAT_EQ (offsetInWorldX, 0.0f);
254 EXPECT_FLOAT_EQ (offsetInWorldY, 0.0f);
255 EXPECT_FLOAT_EQ (worldScaleFactorX, 1.0f);
256 EXPECT_FLOAT_EQ (worldScaleFactorY, 1.0f);
257}
258
259INSTANTIATE_TEST_CASE_P (ExpoAnimationOffsetTest,235INSTANTIATE_TEST_CASE_P (ExpoAnimationOffsetTest,
260 ExpoWallOffsetTestAnimations,236 ExpoWallOffsetTestAnimations,
261 Combine (ValuesIn (testingOffsetParameters),237 Combine (ValuesIn (testingOffsetParameters),

Subscribers

People subscribed via source and target branches