on xenial help sign in
Accept auto repeats for the power down button if timer is not yet running

Can happen if you start pressing the power down button when the screen was off

commit364ac1a9c66743d3e8ac00ce760d98668a7774c1 authorAlbert Astals Cid <albert.astals@canonical.com> dateFri 21 Aug 2015, 14:04 (11 years ago) parenta8f7a60
1 file changed+1−1
qml/Components/PhysicalKeysMapper.qml+1−1
qml/Components/PhysicalKeysMapper.qml+1−1
@@ -68,7 +68,7 @@ Item {
6868
6969 function onKeyPressed(event) {
7070 if ((event.key == Qt.Key_PowerDown || event.key == Qt.Key_PowerOff)
71− && !event.isAutoRepeat) {
71+ && (!event.isAutoRepeat || !powerKeyLongPressTimer.running)) {
7272
7373 // FIXME: We only consider power key presses if the screen is
7474 // on because of bugs 1410830/1409003. The theory is that when