Merge lp:~mterry/unity8/shutdown-dialog-on-resume into lp:unity8
| Status: | Merged | ||||
|---|---|---|---|---|---|
| Approved by: | Michael Terry on 2015-10-28 | ||||
| Approved revision: | 2009 | ||||
| Merged at revision: | 2035 | ||||
| Proposed branch: | lp:~mterry/unity8/shutdown-dialog-on-resume | ||||
| Merge into: | lp:unity8 | ||||
| Diff against target: |
179 lines (+51/-36) 5 files modified
plugins/Utils/windowkeysfilter.cpp (+15/-1) plugins/Utils/windowkeysfilter.h (+7/-0) qml/Components/PhysicalKeysMapper.qml (+16/-23) qml/Shell.qml (+2/-2) tests/qmltests/Components/tst_PhysicalKeysMapper.qml (+11/-10) |
||||
| To merge this branch: | bzr merge lp:~mterry/unity8/shutdown-dialog-on-resume | ||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| PS Jenkins bot | continuous-integration | Needs Fixing on 2015-10-27 | |
| Albert Astals Cid (community) | 2015-10-21 | Approve on 2015-10-23 | |
| Michael Zanetti (community) | Needs Information on 2015-10-22 | ||
|
Review via email:
|
|||
Commit Message
Avoid showing the shutdown dialog when turning on the screen if your device is under heavy load.
Specifically, we actually watch the timestamp of input events as they come in to determine how long it's been. This means that if for whatever reason, processing of events get delayed, we don't misinterpret user input.
To test this, try running the following command and then turning the screen on and off again:
sudo cpulimit -l 1 -c 1 -p `ps ax | grep dbus-daemon | head -n 1 | awk '{print $1;}'`
Without this branch, you'll notice that at some point, you see the shutdown dialog in error. Because unity8 couldn't keep up with events and thought 2s passed between power-pressed and power-released events.
But if we watch the timestamps, we can avoid that particular fate.
Description of the Change
* Are there any related MPs required for this MP to build/function as expected? Please list.
https:/
* Did you perform an exploratory manual test run of your code change and any related functionality?
Yes
* Did you make sure that your branch does not contain spurious tags?
Yes
* If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
NA
* If you changed the UI, has there been a design review?
NA
| Michael Terry (mterry) wrote : | # |
Another option would be to expose the timestamp() value of the current event through to Qml and then use the timestamp of the autorepeated events to determine when two seconds have passed. If we don't trust the interval timing of the autorepeated events.
| Albert Astals Cid (aacid) wrote : | # |
property int powerKeyLongPre
is something that depends on QStyleHints:
What do you think?
| Michael Zanetti (mzanetti) wrote : | # |
Very nice! This seems to work properly now.
* Did you perform an exploratory manual test run of the code change and any related functionality?
yes
* Did CI run pass? If not, please explain why.
The one AP failure seems not related to this.
* Did you make sure that the branch does not contain spurious tags?
yes
| Michael Zanetti (mzanetti) wrote : | # |
Oh, missed alberts comment. Yes, fair point... I was also thinking if API wise it wouldn't make sense to still specify it in ms, and internally divide the time into repeat-counts...
| Michael Terry (mterry) wrote : | # |
Ah great! I didn't know about QStyleHints:
| Albert Astals Cid (aacid) wrote : | # |
Note that before QStyleHints:
| Michael Terry (mterry) wrote : | # |
Ugh. keyboardAutoRep
And keyboardInputIn
So... I can't trust those values. But knowing that they exist, I'm not comfortable ignoring the settings either, like this MP does. I might look at using exposing event timestamps to Qml and comparing those as a more reliable strategy.
| Michael Terry (mterry) wrote : | # |
OK, I've reworked this to use timestamps. Seems to work for me.
- 2008. By Michael Terry on 2015-10-22
-
remove an obsolete code change
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:2008
http://
Executed test runs:
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| Albert Astals Cid (aacid) wrote : | # |
It's weird because in r1942 i fixed a problem with pressing the power off button while the screen was off in which the first event we got was already an autorepeat.
From reading the code this would not work here, we would not set d.powerButtonPr
I'll try testing the bq this afternoon.
| Albert Astals Cid (aacid) wrote : | # |
Tried with the bq and it also works fine, no idea what changed but nothing against from my side.
| Albert Astals Cid (aacid) wrote : | # |
* Did you perform an exploratory manual test run of the code change and any related functionality?
Yes
* Did CI run pass? If not, please explain why.
enough
* Did you make sure that the branch does not contain spurious tags?
Yes
- 2009. By Michael Terry on 2015-10-27
-
Merge from trunk
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:2009
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
| Michael Terry (mterry) wrote : | # |
Reports of this being unreliable seem true. Looks like Qt timestamps behave oddly. Am looking into it.
| Michael Terry (mterry) wrote : | # |
The unreliability was due to bug 1511076. Using branch https:/

FAILED: Continuous integration, rev:2005 jenkins. qa.ubuntu. com/job/ unity8- ci/6507/ jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- vivid-touch/ 4754 jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- wily-touch/ 889 jenkins. qa.ubuntu. com/job/ unity-phablet- qmluitests- vivid/1219 jenkins. qa.ubuntu. com/job/ unity-phablet- qmluitests- wily/535 jenkins. qa.ubuntu. com/job/ unity8- vivid-amd64- ci/1114 jenkins. qa.ubuntu. com/job/ unity8- vivid-i386- ci/1115 jenkins. qa.ubuntu. com/job/ unity8- wily-amd64- ci/746 jenkins. qa.ubuntu. com/job/ unity8- wily-i386- ci/747 jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- runner- vivid-mako/ 3837 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- vivid-armhf/ 4751 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- vivid-armhf/ 4751/artifact/ work/output/ *zip*/output. zip s-jenkins. ubuntu- ci:8080/ job/touch- flash-device/ 24444 jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- runner- wily-mako/ 526 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- wily-armhf/ 889 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- wily-armhf/ 889/artifact/ work/output/ *zip*/output. zip s-jenkins. ubuntu- ci:8080/ job/touch- flash-device/ 24443
http://
Executed test runs:
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/unity8- ci/6507/ rebuild
http://