on xenial help sign in
merge mterry's branch as prereq
ab1b2daMichael Zanetti
qml/Shell.qml+10−1
@@ -184,7 +184,16 @@ Item {
184 if (event.key == Qt.Key_MediaTogglePlayPause || event.key == Qt.Key_MediaPlay) {
184 if (event.key == Qt.Key_MediaTogglePlayPause || event.key == Qt.Key_MediaPlay) {
185 event.accepted = callManager.handleMediaKey(false);
185 event.accepted = callManager.handleMediaKey(false);
186 } else if (event.key == Qt.Key_PowerOff || event.key == Qt.Key_PowerDown) {
186 } else if (event.key == Qt.Key_PowerOff || event.key == Qt.Key_PowerDown) {
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) {
187− dialogs.onPowerKeyPressed();
195+ dialogs.onPowerKeyPressed();
196+ }
188 event.accepted = true;
197 event.accepted = true;
189 } else {
198 } else {
190 volumeKeyFilter.onKeyPressed(event.key);
199 volumeKeyFilter.onKeyPressed(event.key);