Merge lp:~azzar1/unity/lp-1155598 into lp:unity

Proposed by Andrea Azzarone
Status: Work in progress
Proposed branch: lp:~azzar1/unity/lp-1155598
Merge into: lp:unity
Diff against target: 32 lines (+13/-0)
2 files modified
launcher/EdgeBarrierController.cpp (+3/-0)
tests/test_edge_barrier_controller.cpp (+10/-0)
To merge this branch: bzr merge lp:~azzar1/unity/lp-1155598
Reviewer Review Type Date Requested Status
Brandon Schaefer (community) Needs Information
Review via email: mp+154242@code.launchpad.net

Commit message

Don't release the barrier on single monitor.

Description of the change

== Problem ==
Autohide launcher can be stuck hidden

== Fix ==
Don't release the barrier on single monitor.

== Test ==
Unit test added.

To post a comment you must log in.
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

Hmm wont this still be a problem with 2 edge barriers? I mean to get it stuck at the moment is you move hard enough into the barrier to break it while showing the launcher. Then moving the mouse away and back against it before the barrier is rebuilt so it keeps releasing the barrier....So this will still be a problem with more then 1 monitor right?

review: Needs Information
Revision history for this message
Andrea Azzarone (azzar1) wrote :

> Hmm wont this still be a problem with 2 edge barriers? I mean to get it stuck
> at the moment is you move hard enough into the barrier to break it while
> showing the launcher. Then moving the mouse away and back against it before
> the barrier is rebuilt so it keeps releasing the barrier....So this will still
> be a problem with more then 1 monitor right?

I need to try. Thanks ;)

Unmerged revisions

3232. By Andrea Azzarone

Don't release the barrier on single monitor.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'launcher/EdgeBarrierController.cpp'
2--- launcher/EdgeBarrierController.cpp 2013-02-13 19:21:49 +0000
3+++ launcher/EdgeBarrierController.cpp 2013-03-20 02:25:28 +0000
4@@ -206,6 +206,9 @@
5
6 void EdgeBarrierController::Impl::BarrierRelease(PointerBarrierWrapper* owner, int event)
7 {
8+ if (barriers_.size() <= 1)
9+ return;
10+
11 owner->ReleaseBarrier(event);
12 owner->released = true;
13 BarrierReset();
14
15=== modified file 'tests/test_edge_barrier_controller.cpp'
16--- tests/test_edge_barrier_controller.cpp 2013-02-13 19:21:49 +0000
17+++ tests/test_edge_barrier_controller.cpp 2013-03-20 02:25:28 +0000
18@@ -367,4 +367,14 @@
19 ProcessBarrierEvent(&owner, firstEvent);
20 }
21
22+TEST_F(TestEdgeBarrierController, BreakingEdgeOnSingleMonitorDoesNotReleasesBarrier)
23+{
24+ MockPointerBarrier owner;
25+ uscreen.Reset();
26+
27+ EXPECT_CALL(owner, ReleaseBarrier(_)).Times(0);
28+ ProcessBarrierEvent(&owner, MakeBarrierEvent(1, true));
29+ ASSERT_FALSE(owner.released());
30+}
31+
32 }