]> git.neil.brown.name Git - plato.git/commitdiff
lock: don't stop sounds unless key is pressed.
authorNeilBrown <neilb@suse.de>
Mon, 16 Dec 2013 02:26:42 +0000 (13:26 +1100)
committerNeilBrown <neilb@suse.de>
Mon, 16 Dec 2013 02:26:42 +0000 (13:26 +1100)
i.e. ignore just screen tap.

Not sure this is exactly the right solution yet.

utils/lock.py

index c4ab396ed7a03b8b9d69c43c88171f739db5b5dc..e22368a71945b7e73c2456ce9b94375949fad1a9 100755 (executable)
@@ -354,7 +354,9 @@ def wake_all(down_cnt, moment, typ, code, value):
         return
     if suspended:
         return
-    alert.stopall()
+    if type == 1 and code != 330:
+        # EV_KEY but not BTN_TOUCH
+        alert.stopall()
     display.on()
     if down_cnt == 0:
         release_all()
@@ -368,7 +370,7 @@ def wake_dim(down_cnt, moment, typ, code, value):
     global state, suspended
     if suspended:
         return
-    if typ == 0:
+    if typ != 1: # EV_KEY
         return
     #print "wake_dim"
     if state == "dim" or state == "full":