on xenial help sign in
merge mterry's branch as prereq
commitab1b2dace99838a8e2c6f08d7bbde68a23c0349f authorMichael Zanetti <michael.zanetti@canonical.com> dateWed 21 Jan 2015, 15:40 (12 years ago) parent7fa60436597dce
1 file changed+10−1
qml/Shell.qml+10−1
qml/Shell.qml+10−1
@@ -184,7 +184,16 @@ Item {
184184 if (event.key == Qt.Key_MediaTogglePlayPause || event.key == Qt.Key_MediaPlay) {
185185 event.accepted = callManager.handleMediaKey(false);
186186 } else if (event.key == Qt.Key_PowerOff || event.key == Qt.Key_PowerDown) {
187− dialogs.onPowerKeyPressed();
187+ // FIXME: We only consider power key presses if the screen is
188+ // on because of bugs 1410830/1409003. The theory is that when
189+ // those bugs are encountered, there is a >2s delay between the
190+ // power press event and the power release event, which causes
191+ // the shutdown dialog to appear on resume. So to avoid that
192+ // symptom while we investigate the root cause, we simply won't
193+ // initiate any dialogs when the screen is off.
194+ if (Powerd.status === Powerd.On) {
195+ dialogs.onPowerKeyPressed();
196+ }
188197 event.accepted = true;
189198 } else {
190199 volumeKeyFilter.onKeyPressed(event.key);