aboutsummaryrefslogtreecommitdiff
path: root/mytest.py
diff options
context:
space:
mode:
Diffstat (limited to 'mytest.py')
-rwxr-xr-xmytest.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/mytest.py b/mytest.py
index 423031fb..c335bf2d 100755
--- a/mytest.py
+++ b/mytest.py
@@ -342,6 +342,9 @@ class PowerKey:
self.session.open(Screens.Standby.TryQuitMainloop, 1)
def powerlong(self):
+ if Screens.Standby.inTryQuitMainloop or (self.session.current_dialog and not self.session.current_dialog.ALLOW_SUSPEND):
+ return
+
self.standbyblocked = 1
action = config.usage.on_long_powerpress.value
if action == "shutdown":