Merge lp:~aacid/unity-2d/sticky_rtl into lp:unity-2d

Proposed by Albert Astals Cid
Status: Merged
Approved by: Gerry Boland
Approved revision: 1103
Merged at revision: 1104
Proposed branch: lp:~aacid/unity-2d/sticky_rtl
Merge into: lp:unity-2d
Diff against target: 26 lines (+7/-1)
2 files modified
shell/Shell.qml (+1/-1)
tests/manual-tests/other.txt (+6/-0)
To merge this branch: bzr merge lp:~aacid/unity-2d/sticky_rtl
Reviewer Review Type Date Requested Status
Gerry Boland (community) Approve
Review via email: mp+107184@code.launchpad.net

Commit message

[shell] Make sticky edges work for the first screen in RTL mode

Description of the change

Make sticky edge work for the first screen in RTL mode

To post a comment you must log in.
Revision history for this message
Gerry Boland (gerboland) wrote :

Is the comment above your change still relevant, or should it be changed?

Change works fine for 2 monitors, and I see no reason why 3+ would not work either.

review: Needs Information
Revision history for this message
Albert Astals Cid (aacid) wrote :

The first was the only one not working because of the "declarativeView.screen.geometry.x > 0" check, so that's the only one fixed because it was the only one broken.

Revision history for this message
Gerry Boland (gerboland) wrote :

Gotcha. Ok, I'm happy. Thank you!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'shell/Shell.qml'
2--- shell/Shell.qml 2012-04-16 15:14:34 +0000
3+++ shell/Shell.qml 2012-05-24 10:14:19 +0000
4@@ -293,7 +293,7 @@
5 // This enableSticky logic has a 'bug' int RTL where the right most screen will still have enableSticky
6 // set to true, but it won't cause any issue other than consuming a few bytes of mememory and calculating the
7 // rightmost x is probably more expensive and error prone than just enabling the extra barrier
8- property bool enableSticky: unity2dConfiguration.stickyEdges && declarativeView.screen.geometry.x > 0
9+ property bool enableSticky: unity2dConfiguration.stickyEdges && (declarativeView.screen.geometry.x > 0 || Utils.isRightToLeft())
10
11 id: leftBarrier
12 triggerDirection: Utils.isLeftToRight() ? PointerBarrier.TriggerFromRight : PointerBarrier.TriggerFromLeft
13
14=== modified file 'tests/manual-tests/other.txt'
15--- tests/manual-tests/other.txt 2012-04-26 09:43:24 +0000
16+++ tests/manual-tests/other.txt 2012-05-24 10:14:19 +0000
17@@ -19,3 +19,9 @@
18 * Set the launcher to autohide
19
20 -> Verify that there is no crash and the launcher is set back always shown
21+----
22+ * Have 2 screens stacked horizontally
23+ * Run unity-2d-shell in RTL mode (use -reverse)
24+ * Enable sticky edges
25+
26+-> Verify that there is a mouse barrier between the two screens

Subscribers

People subscribed via source and target branches