Merge lp:~brandontschaefer/unity/lp.1199050-fix into lp:unity
Status: | Merged |
---|---|
Approved by: | Stephen M. Webb |
Approved revision: | no longer in the source branch. |
Merged at revision: | 3418 |
Proposed branch: | lp:~brandontschaefer/unity/lp.1199050-fix |
Merge into: | lp:unity |
Diff against target: |
77 lines (+42/-1) 2 files modified
launcher/PointerBarrier.cpp (+4/-1) tests/test_pointer_barrier.cpp (+38/-0) |
To merge this branch: | bzr merge lp:~brandontschaefer/unity/lp.1199050-fix |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Stephen M. Webb (community) | Approve | ||
PS Jenkins bot (community) | continuous-integration | Approve | |
Review via email: mp+173845@code.launchpad.net |
Commit message
Don't calculate the velocity if dtime is 0. This way we don't get a huge velocity on the initial barrier hit.
Description of the change
=== Problem ===
When we got an event we had to calculate the velocity of the event. If dtime was 0, I was assuming it was ok to just use 1. The problem is this would create a huge number when it was ever 0. Causing the barrier to break waay to easy, causing the launcher to not reveal as easy as it use to.
=== Fix ===
If dtime is 0, just return the velocity as 1, instead of calculating the velc and only dividing by 1...
=== Tests ===
Test we don't break the barrier if we have 0 dtime
Test we break the barrier if we have greater then 0 dtime and the velc is greater then the threshold.
PASSED: Continuous integration, rev:3415 jenkins. qa.ubuntu. com/job/ unity-ci/ 212/ jenkins. qa.ubuntu. com/job/ unity-saucy- amd64-ci/ 101 jenkins. qa.ubuntu. com/job/ unity-saucy- armhf-ci/ 99 jenkins. qa.ubuntu. com/job/ unity-saucy- i386-ci/ 100
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins: 8080/job/ unity-ci/ 212/rebuild
http://