Merge lp:~lukas-kde/unity8/superKeyPressFix into lp:unity8
| Status: | Merged | ||||
|---|---|---|---|---|---|
| Approved by: | Daniel d'Andrada on 2016-11-29 | ||||
| Approved revision: | 2662 | ||||
| Merged at revision: | 2727 | ||||
| Proposed branch: | lp:~lukas-kde/unity8/superKeyPressFix | ||||
| Merge into: | lp:unity8 | ||||
| Diff against target: |
244 lines (+87/-18) 4 files modified
plugins/Utils/ElapsedTimer.h (+1/-1) plugins/Utils/Timer.cpp (+5/-2) plugins/Utils/Timer.h (+5/-6) tests/plugins/Utils/WindowInputMonitorTest.cpp (+76/-9) |
||||
| To merge this branch: | bzr merge lp:~lukas-kde/unity8/superKeyPressFix | ||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Unity8 CI Bot | continuous-integration | Approve on 2016-11-28 | |
| Albert Astals Cid (community) | 2016-10-07 | Abstain on 2016-11-28 | |
| Daniel d'Andrada (community) | Approve on 2016-10-10 | ||
|
Review via email:
|
|||
Commit Message
Fix the Super key not invoking the dash scope home
Description of the Change
Fix the Super key not invoking the dash scope home
lp:1607427 - super key not showing scopes home
Do not lie about a timer running, when it's not
| Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2658
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
SUCCESS: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
| Albert Astals Cid (aacid) wrote : | # |
I don't see how this makes a difference
Previously we had single shot, which means the timeout signal gets emitted and then it stops itself, so basically we get emitActivatedIf
Now we have no single show but we still stop the timer when emitActivatedIf
So basically the same is happening before and after the patch?
| Daniel d'Andrada (dandrader) wrote : | # |
Yeah, I also don't get it. A timer being singleshot means that it times out only once and then stops itself. Unlike a regular timer which will timeout every QTimer::interval() milliseconds until you manually stop() it.
| Lukáš Tinkl (lukas-kde) wrote : | # |
Yeah, the core of this problem seems to be the fact that even a single shot timer, although it fires only once, is never stopped.
The fake timer was doing a manual stop() in that case; if you remove this discrepancy, then the regression test passes with this branch, and fails in the real environment - resulting in the bug, as described in lp:1607427.
In other words, the functionality works exactly once - and then stops working. The key press handler has this:
...
&& !m_activationTi
meaning that if the timer is never stopped, it will never register any subsequent Super key presses.
| Lukáš Tinkl (lukas-kde) wrote : | # |
Also, without this branch, any long press of the Super key would break this
| Albert Astals Cid (aacid) wrote : | # |
I think the problem lies in the Timer wrapping, i'll suggest a different MR in a few minutes
| Daniel d'Andrada (dandrader) wrote : | # |
On 10/10/2016 10:33, Lukáš Tinkl wrote:
> Yeah, the core of this problem seems to be the fact that even a single shot timer, although it fires only once, is never stopped.
>
> The fake timer was doing a manual stop() in that case; if you remove this discrepancy, then the regression test passes with this branch, and fails in the real environment - resulting in the bug, as described in lp:1607427.
>
> In other words, the functionality works exactly once - and then stops working. The key press handler has this:
>
> ...
> && !m_activationTi
>
> meaning that if the timer is never stopped, it will never register any subsequent Super key presses.
That's all very strange. qtimer.cpp has this:
"""
void QTimer:
{
if (e->timerId() == id) {
if (single)
emit timeout(
}
}
"""
ie, a singleshot timer stops itself on timeout...
| Lukáš Tinkl (lukas-kde) wrote : | # |
> On 10/10/2016 10:33, Lukáš Tinkl wrote:
> > Yeah, the core of this problem seems to be the fact that even a single shot
> timer, although it fires only once, is never stopped.
> >
> > The fake timer was doing a manual stop() in that case; if you remove this
> discrepancy, then the regression test passes with this branch, and fails in
> the real environment - resulting in the bug, as described in lp:1607427.
> >
> > In other words, the functionality works exactly once - and then stops
> working. The key press handler has this:
> >
> > ...
> > && !m_activationTi
> >
> > meaning that if the timer is never stopped, it will never register any
> subsequent Super key presses.
>
>
> That's all very strange. qtimer.cpp has this:
>
> """
>
> void QTimer:
> {
> if (e->timerId() == id) {
> if (single)
> stop();
> emit timeout(
> }
> }
>
> """
>
>
> ie, a singleshot timer stops itself on timeout...
Yeah, but our (your :p) Utils/Timer.cpp doesn't and that's the problem really
| Albert Astals Cid (aacid) wrote : | # |
I think this is a better fix, actually fixing Timer::isRunning not to lie
http://
What do you think?
| Albert Astals Cid (aacid) wrote : | # |
Forgot to initialize m_isRunning http://
| Daniel d'Andrada (dandrader) wrote : | # |
> Forgot to initialize m_isRunning http://
Now that makes sense. Proper fix.
| Lukáš Tinkl (lukas-kde) wrote : | # |
Pushed Albert's change
| Daniel d'Andrada (dandrader) wrote : | # |
Looks good to me.
* Did you perform an exploratory manual test run of the code change and any related functionality?
No, but fix is simple, and so is the code being fixed. That, plus the regression test, makes me confident enough to approve it already.
* Did CI run pass? If not, please explain why.
No results yet. May reassess once it comes.
| Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2659
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
| Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2661
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
| Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2661
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
- 2662. By Lukáš Tinkl on 2016-11-28
-
don't return garbage when the timer isn't running, or never been started
| Lukáš Tinkl (lukas-kde) wrote : | # |
Submitted a fix for what I think is the culprit why it can occasionally break
(quite visible when testing the appDrawer branch):
QElapsedTimer:
| Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:2662
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
- 2663. By Lukáš Tinkl on 2016-11-29
-
make the FakeElapsedTimer more realistic; adapt the test

FAILED: Continuous integration, rev:2657 /unity8- jenkins. ubuntu. com/job/ lp-unity8- ci/2343/ /unity8- jenkins. ubuntu. com/job/ build/3084 /unity8- jenkins. ubuntu. com/job/ test-0- autopkgtest/ label=amd64, release= vivid+overlay, testname= qmluitests. sh/1731 /unity8- jenkins. ubuntu. com/job/ test-0- autopkgtest/ label=amd64, release= xenial+ overlay, testname= qmluitests. sh/1731 /unity8- jenkins. ubuntu. com/job/ test-0- autopkgtest/ label=amd64, release= yakkety, testname= qmluitests. sh/1731 /unity8- jenkins. ubuntu. com/job/ build-0- fetch/3112 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= vivid+overlay/ 2969 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= vivid+overlay/ 2969/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 2969 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 2969/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= yakkety/ 2969 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= yakkety/ 2969/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= vivid+overlay/ 2969 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= vivid+overlay/ 2969/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= xenial+ overlay/ 2969 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= xenial+ overlay/ 2969/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= yakkety/ 2969 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= yakkety/ 2969/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= vivid+overlay/ 2969 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= vivid+overlay/ 2969/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= xenial+ overlay/ 2969 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= xenial+ overlay/ 2969/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= yakkety/ 2969 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= yakkety/ 2969/artifact/ output/ *zip*/output. zip
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild: /unity8- jenkins. ubuntu. com/job/ lp-unity8- ci/2343/ rebuild
https:/