Merge lp:~klap-in/compiz/bug904205 into lp:compiz/0.9.8

Proposed by klap-in
Status: Merged
Approved by: Daniel van Vugt
Approved revision: 3276
Merged at revision: 3276
Proposed branch: lp:~klap-in/compiz/bug904205
Merge into: lp:compiz/0.9.8
Diff against target: 49 lines (+10/-10)
1 file modified
plugins/wall/src/wall.cpp (+10/-10)
To merge this branch: bzr merge lp:~klap-in/compiz/bug904205
Reviewer Review Type Date Requested Status
Daniel van Vugt Approve
Sam Spilsbury Approve
Review via email: mp+113058@code.launchpad.net

Commit message

Using the next/previous bindings the wall plugin didn't calculate correctly the next workspace when it reaches the begin or the end of a row of workspaces, so it didn't jump to the next line. (LP: #904205)

Description of the change

Using the next/previous bindings the wall plugin didn't calculate correctly the next workspace when it reachs the begin or the end of a row of workspaces, so it didn't jump to the next line.

To post a comment you must log in.
Revision history for this message
Sam Spilsbury (smspillaz) wrote :

Looks fine. This code looks pretty testable on its own, so it would be good if someone could get this under test before we merge it. (Time permitting)

review: Approve
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I've tested everything I can think of with respect to wall sliding, layouts and wrapping. All works well.

review: Approve
Revision history for this message
Unity Merger (unity-merger) wrote :

No commit message specified.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/wall/src/wall.cpp'
2--- plugins/wall/src/wall.cpp 2012-05-27 04:32:55 +0000
3+++ plugins/wall/src/wall.cpp 2012-07-02 14:44:22 +0000
4@@ -731,17 +731,17 @@
5 if ((vpX == (unsigned int) size.width () - 1) &&
6 (vpY == (unsigned int) size.height () - 1))
7 {
8- amountX = -(size.width () - 1);
9- amountY = -(size.height () - 1);
10+ amountX = size.width () - 1;
11+ amountY = size.height () - 1;
12 }
13 else if (vpX == (unsigned int) size.width () - 1)
14 {
15- amountX = -(size.width () - 1);
16- amountY = 1;
17+ amountX = size.width () - 1;
18+ amountY = -1;
19 }
20 else
21 {
22- amountX = 1;
23+ amountX = -1;
24 amountY = 0;
25 }
26
27@@ -749,17 +749,17 @@
28 case Prev:
29 if (vpX == 0 && vpY == 0)
30 {
31- amountX = size.width () - 1;
32- amountY = size.height () - 1;
33+ amountX = -(size.width () - 1);
34+ amountY = -(size.height () - 1);
35 }
36 else if (vpX == 0)
37 {
38- amountX = size.width () - 1;
39- amountY = -1;
40+ amountX = -(size.width () - 1);
41+ amountY = 1;
42 }
43 else
44 {
45- amountX = -1;
46+ amountX = 1;
47 amountY = 0;
48 }
49 break;

Subscribers

People subscribed via source and target branches