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
=== modified file 'plugins/grid/src/grid.cpp'
--- plugins/grid/src/grid.cpp 2013-01-23 06:18:17 +0000
+++ plugins/grid/src/grid.cpp 2013-03-22 10:14:23 +0000
@@ -732,34 +732,43 @@
732 screen->outputDeviceForPoint (CompPoint (pointerX, pointerY)));732 screen->outputDeviceForPoint (CompPoint (pointerX, pointerY)));
733733
734 /* Detect corners first */734 /* Detect corners first */
735
735 /* Bottom Left */736 /* Bottom Left */
736 if (pointerY > (out.y () + out.height () - optionGetBottomEdgeThreshold()) &&737 if (pointerY > (out.y () + out.height () - optionGetBottomEdgeThreshold ()) &&
737 pointerX < out.x () + optionGetLeftEdgeThreshold())738 pointerX < (out.x () + optionGetLeftEdgeThreshold ()))
738 edge = BottomLeft;739 edge = BottomLeft;
740
739 /* Bottom Right */741 /* Bottom Right */
740 else if (pointerY > (out.y () + out.height () - optionGetBottomEdgeThreshold()) &&742 else if (pointerY > (out.y () + out.height () - optionGetBottomEdgeThreshold ()) &&
741 pointerX > (out.x () + out.width () - optionGetRightEdgeThreshold()))743 pointerX > (out.x () + out.width () - optionGetRightEdgeThreshold ()))
742 edge = BottomRight;744 edge = BottomRight;
745
743 /* Top Left */746 /* Top Left */
744 else if (pointerY < optionGetTopEdgeThreshold() &&747 else if (pointerY < (out.y () + optionGetTopEdgeThreshold ()) &&
745 pointerX < optionGetLeftEdgeThreshold())748 pointerX < (out.x () + optionGetLeftEdgeThreshold ()))
746 edge = TopLeft;749 edge = TopLeft;
750
747 /* Top Right */751 /* Top Right */
748 else if (pointerY < out.y () + optionGetTopEdgeThreshold() &&752 else if (pointerY < (out.y () + optionGetTopEdgeThreshold ()) &&
749 pointerX > (out.x () + out.width () - optionGetRightEdgeThreshold()))753 pointerX > (out.x () + out.width () - optionGetRightEdgeThreshold ()))
750 edge = TopRight;754 edge = TopRight;
755
751 /* Left */756 /* Left */
752 else if (pointerX < out.x () + optionGetLeftEdgeThreshold())757 else if (pointerX < (out.x () + optionGetLeftEdgeThreshold ()))
753 edge = Left;758 edge = Left;
759
754 /* Right */760 /* Right */
755 else if (pointerX > (out.x () + out.width () - optionGetRightEdgeThreshold()))761 else if (pointerX > (out.x () + out.width () - optionGetRightEdgeThreshold ()))
756 edge = Right;762 edge = Right;
763
757 /* Top */764 /* Top */
758 else if (pointerY < out.y () + optionGetTopEdgeThreshold())765 else if (pointerY < (out.y () + optionGetTopEdgeThreshold ()))
759 edge = Top;766 edge = Top;
767
760 /* Bottom */768 /* Bottom */
761 else if (pointerY > (out.y () + out.height () - optionGetBottomEdgeThreshold()))769 else if (pointerY > (out.y () + out.height () - optionGetBottomEdgeThreshold ()))
762 edge = Bottom;770 edge = Bottom;
771
763 /* No Edge */772 /* No Edge */
764 else773 else
765 edge = NoEdge;774 edge = NoEdge;

Subscribers

People subscribed via source and target branches

to all changes: