Merge lp://staging/~3v1n0/unity/barrier-timeout into lp://staging/unity

Proposed by Marco Trevisan (Treviño)
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: no longer in the source branch.
Merged at revision: 2517
Proposed branch: lp://staging/~3v1n0/unity/barrier-timeout
Merge into: lp://staging/unity
Diff against target: 1251 lines (+587/-158)
17 files modified
UnityCore/GLibSource.cpp (+1/-2)
launcher/Decaymulator.h (+1/-3)
launcher/EdgeBarrierController.cpp (+88/-46)
launcher/EdgeBarrierController.h (+8/-7)
launcher/LauncherController.cpp (+4/-5)
launcher/LauncherHideMachine.cpp (+6/-8)
launcher/LauncherHideMachine.h (+1/-1)
launcher/LauncherHoverMachine.cpp (+1/-2)
launcher/LauncherOptions.cpp (+34/-34)
launcher/LauncherOptions.h (+1/-0)
launcher/PointerBarrier.cpp (+30/-23)
launcher/PointerBarrier.h (+17/-16)
plugins/unityshell/src/unityshell.cpp (+5/-0)
plugins/unityshell/unityshell.xml.in (+8/-0)
tests/CMakeLists.txt (+16/-11)
tests/test_edge_barrier_controller.cpp (+225/-0)
tests/test_pointer_barrier.cpp (+141/-0)
To merge this branch: bzr merge lp://staging/~3v1n0/unity/barrier-timeout
Reviewer Review Type Date Requested Status
jenkins (community) continuous-integration Approve
Brandon Schaefer (community) Approve
Review via email: mp+115850@code.staging.launchpad.net

Commit message

BarrierEdgeController, PointerBarrier: release the sticky edge after that the user has broken it for configurable ms

Description of the change

Added a new setting on CCSM as requested by design to define an option that should disable the sticky edges for a defined amount of time as soon as the sticky edges have been broken.

To do that, I've both modified PointerBarrier to add a released property and to emit the events without any delay when released (this is need to avoid that the mouse is blocked a little even when the barrier is released), and EdgeBarrierController to temporary set the barrier as released when it has just been broken.

Fixed a memory leak in EdgeBarrierController (the impl was never deleted!) using std::unique_ptr. This also fixes the crash of bug #1020075
Plus some classic refactoring :P (like using initialization lists, removed old-style casts, switched to stack-allocated classes when possible, using make_shared)

Added brand new unit tests for both PointerBarrier and EdgeBarrierController to check their behavior.

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

All test pass, works manually and code looks good!

review: Approve
Revision history for this message
jenkins (martin-mrazik+qa) wrote :
review: Approve (continuous-integration)
Revision history for this message
jenkins (martin-mrazik+qa) wrote :
review: Approve (continuous-integration)
Revision history for this message
jenkins (martin-mrazik+qa) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.