Merge lp:~mc-return/compiz/compiz-raring.merge-fix1139835-grid-wrong-top-left-corner-calculation into lp:compiz/raring

Proposed by MC Return
Status: Merged
Approved by: Francis Ginther
Approved revision: 3638
Merged at revision: 3638
Proposed branch: lp:~mc-return/compiz/compiz-raring.merge-fix1139835-grid-wrong-top-left-corner-calculation
Merge into: lp:compiz/raring
Diff against target: 59 lines (+21/-12)
1 file modified
plugins/grid/src/grid.cpp (+21/-12)
To merge this branch: bzr merge lp:~mc-return/compiz/compiz-raring.merge-fix1139835-grid-wrong-top-left-corner-calculation
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Timo Jyrinki Approve
Łukasz Zemczak Approve
Review via email: mp+154899@code.launchpad.net

Commit message

Backported fix for bug #1139835 (lp:compiz r3630) to Compiz Raring:

Grid plugin:
Fixed wrong calculation of top-left corner coordinates.
Now detection of this corner also works on multimonitor configurations.
Improved readability of the grid corner detection code.

Description of the change

Note:
Some brackets are superfluos, but they have been added for better readability.

Note 2:
Grid's indentation is completely broken after recent hacking on it, but this branch ignores that.

To post a comment you must log in.
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

As with trunk, works well +1

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

sil2100, thanks :) +1

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
MC Return (mc-return) wrote :

Some Jenkins connection failure: Err http://naartjie raring/ Release.gpg
  Could not connect to naartjie:80 (10.97.9.6). - connect (110: Connection timed out)

Needs re-approval to land, I guess...

Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

Trying...

review: Approve
Revision history for this message
Francis Ginther (fginther) wrote :

I'm looking into the jenkins failure. Some new arm builders have been added and one or two may have not been configured correctly. Will top approve once I have it checked out.

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
1=== modified file 'plugins/grid/src/grid.cpp'
2--- plugins/grid/src/grid.cpp 2013-01-23 06:18:17 +0000
3+++ plugins/grid/src/grid.cpp 2013-03-22 10:14:23 +0000
4@@ -732,34 +732,43 @@
5 screen->outputDeviceForPoint (CompPoint (pointerX, pointerY)));
6
7 /* Detect corners first */
8+
9 /* Bottom Left */
10- if (pointerY > (out.y () + out.height () - optionGetBottomEdgeThreshold()) &&
11- pointerX < out.x () + optionGetLeftEdgeThreshold())
12+ if (pointerY > (out.y () + out.height () - optionGetBottomEdgeThreshold ()) &&
13+ pointerX < (out.x () + optionGetLeftEdgeThreshold ()))
14 edge = BottomLeft;
15+
16 /* Bottom Right */
17- else if (pointerY > (out.y () + out.height () - optionGetBottomEdgeThreshold()) &&
18- pointerX > (out.x () + out.width () - optionGetRightEdgeThreshold()))
19+ else if (pointerY > (out.y () + out.height () - optionGetBottomEdgeThreshold ()) &&
20+ pointerX > (out.x () + out.width () - optionGetRightEdgeThreshold ()))
21 edge = BottomRight;
22+
23 /* Top Left */
24- else if (pointerY < optionGetTopEdgeThreshold() &&
25- pointerX < optionGetLeftEdgeThreshold())
26+ else if (pointerY < (out.y () + optionGetTopEdgeThreshold ()) &&
27+ pointerX < (out.x () + optionGetLeftEdgeThreshold ()))
28 edge = TopLeft;
29+
30 /* Top Right */
31- else if (pointerY < out.y () + optionGetTopEdgeThreshold() &&
32- pointerX > (out.x () + out.width () - optionGetRightEdgeThreshold()))
33+ else if (pointerY < (out.y () + optionGetTopEdgeThreshold ()) &&
34+ pointerX > (out.x () + out.width () - optionGetRightEdgeThreshold ()))
35 edge = TopRight;
36+
37 /* Left */
38- else if (pointerX < out.x () + optionGetLeftEdgeThreshold())
39+ else if (pointerX < (out.x () + optionGetLeftEdgeThreshold ()))
40 edge = Left;
41+
42 /* Right */
43- else if (pointerX > (out.x () + out.width () - optionGetRightEdgeThreshold()))
44+ else if (pointerX > (out.x () + out.width () - optionGetRightEdgeThreshold ()))
45 edge = Right;
46+
47 /* Top */
48- else if (pointerY < out.y () + optionGetTopEdgeThreshold())
49+ else if (pointerY < (out.y () + optionGetTopEdgeThreshold ()))
50 edge = Top;
51+
52 /* Bottom */
53- else if (pointerY > (out.y () + out.height () - optionGetBottomEdgeThreshold()))
54+ else if (pointerY > (out.y () + out.height () - optionGetBottomEdgeThreshold ()))
55 edge = Bottom;
56+
57 /* No Edge */
58 else
59 edge = NoEdge;

Subscribers

People subscribed via source and target branches

to all changes: