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

Proposed by Christopher Townsend
Status: Merged
Approved by: Brandon Schaefer
Approved revision: 3782
Merged at revision: 3783
Proposed branch: lp:~townsend/compiz/fix-lp1031710-0.9.10
Merge into: lp:compiz/0.9.10
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-0.9.10
Reviewer Review Type Date Requested Status
Brandon Schaefer (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+181405@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
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/expo/src/wall_offset/src/wall-offset.cpp'
2--- plugins/expo/src/wall_offset/src/wall-offset.cpp 2013-06-13 21:11:08 +0000
3+++ plugins/expo/src/wall_offset/src/wall-offset.cpp 2013-08-21 20:35:26 +0000
4@@ -39,17 +39,11 @@
5 worldScaleFactorX = 1.0f;
6 worldScaleFactorY = 1.0f;
7
8- if (output.left () == 0)
9- {
10- offsetInWorldX = ((vpSize.x () * sx) / ((float) output.width ()) * (offsetInScreenCoords.x ()) * animationProgress);
11- worldScaleFactorX = 1.0f - ((float) (offsetInScreenCoords.x ()) / (float) (output.width ())) * animationProgress;
12- }
13+ offsetInWorldX = ((vpSize.x () * sx) / ((float) output.width ()) * (offsetInScreenCoords.x ()) * animationProgress);
14+ worldScaleFactorX = 1.0f - ((float) (offsetInScreenCoords.x ()) / (float) (output.width ())) * animationProgress;
15
16- if (output.top () == 0)
17- {
18- offsetInWorldY = ((vpSize.y () * sy) / ((float) output.height ()) * (offsetInScreenCoords.y ()) * animationProgress);
19- worldScaleFactorY = 1.0f - ((float) (offsetInScreenCoords.y ()) / (float) output.height ()) * animationProgress;
20- }
21+ offsetInWorldY = ((vpSize.y () * sy) / ((float) output.height ()) * (offsetInScreenCoords.y ()) * animationProgress);
22+ worldScaleFactorY = 1.0f - ((float) (offsetInScreenCoords.y ()) / (float) output.height ()) * animationProgress;
23 }
24 }
25 }
26
27=== modified file 'plugins/expo/src/wall_offset/tests/test-expo-wall-offset.cpp'
28--- plugins/expo/src/wall_offset/tests/test-expo-wall-offset.cpp 2012-11-23 09:07:48 +0000
29+++ plugins/expo/src/wall_offset/tests/test-expo-wall-offset.cpp 2013-08-21 20:35:26 +0000
30@@ -232,30 +232,6 @@
31 EXPECT_FLOAT_EQ (worldScaleFactorY, offset.animationParameters[index].worldScaleFactorY);
32 }
33
34-TEST_F (ExpoWallOffsetTest, TestNoOffsetIfOutputIsNotOrigin)
35-{
36- compiz::expo::calculateWallOffset (CompRect (1,
37- 1,
38- 100,
39- 100),
40- CompPoint (100,
41- 100),
42- CompPoint (1,
43- 1),
44- CompSize (100,
45- 100),
46- offsetInWorldX,
47- offsetInWorldY,
48- worldScaleFactorX,
49- worldScaleFactorY,
50- 1.0);
51-
52- EXPECT_FLOAT_EQ (offsetInWorldX, 0.0f);
53- EXPECT_FLOAT_EQ (offsetInWorldY, 0.0f);
54- EXPECT_FLOAT_EQ (worldScaleFactorX, 1.0f);
55- EXPECT_FLOAT_EQ (worldScaleFactorY, 1.0f);
56-}
57-
58 INSTANTIATE_TEST_CASE_P (ExpoAnimationOffsetTest,
59 ExpoWallOffsetTestAnimations,
60 Combine (ValuesIn (testingOffsetParameters),

Subscribers

People subscribed via source and target branches