on xenial help sign in
Don't show any power dialogs while the screen is off. This is a band-aid to avoid the symptom, while we still investigate the source of why the screen doesn't turn on (and why we seem to not handle the power-button-release event). Fixes: #1409003, #1410830

Approved by: Gerry Boland

commit47c036e4f75eddd1ea428d78ee310ba36511c571 authorMichael Terry <michael.terry@canonical.com> dateWed 21 Jan 2015, 18:32 (12 years ago) parent885198693e094c
1 file changed+10−1
qml/Shell.qml+10−1
qml/Shell.qml+10−1
@@ -181,7 +181,16 @@ Item {
181181 WindowKeysFilter {
182182 Keys.onPressed: {
183183 if (event.key == Qt.Key_PowerOff || event.key == Qt.Key_PowerDown) {
184− dialogs.onPowerKeyPressed();
184+ // FIXME: We only consider power key presses if the screen is
185+ // on because of bugs 1410830/1409003. The theory is that when
186+ // those bugs are encountered, there is a >2s delay between the
187+ // power press event and the power release event, which causes
188+ // the shutdown dialog to appear on resume. So to avoid that
189+ // symptom while we investigate the root cause, we simply won't
190+ // initiate any dialogs when the screen is off.
191+ if (Powerd.status === Powerd.On) {
192+ dialogs.onPowerKeyPressed();
193+ }
185194 event.accepted = true;
186195 } else {
187196 volumeKeyFilter.onKeyPressed(event.key);