on xenial help sign in
Show the greeter when powerd tells us to, not just whenever we press the power key. Fixes: https://bugs.launchpad.net/bugs/1186256.
5da4ba4Michael Terry
Shell.qml+1−6
@@ -128,12 +128,6 @@ FocusScope {
128 Keys.onVolumeUpPressed: volumeControl.volumeUp()
128 Keys.onVolumeUpPressed: volumeControl.volumeUp()
129 Keys.onVolumeDownPressed: volumeControl.volumeDown()
129 Keys.onVolumeDownPressed: volumeControl.volumeDown()
130
130
131− Keys.onReleased: {
132− if (event.key == Qt.Key_PowerOff) {
133− greeter.show()
134− }
135− }
136−
137 Item {
131 Item {
138 id: underlay
132 id: underlay
139 objectName: "underlay"
133 objectName: "underlay"
@@ -488,6 +482,7 @@ FocusScope {
488 onPowerStateChange: {
482 onPowerStateChange: {
489 if (state == 0) { // suspend
483 if (state == 0) { // suspend
490 powerConnection.setFocused(false);
484 powerConnection.setFocused(false);
485+ greeter.show();
491 } else if (state == 1) { // active
486 } else if (state == 1) { // active
492 powerConnection.setFocused(true);
487 powerConnection.setFocused(true);
493 }
488 }