summaryrefslogtreecommitdiff
path: root/scripts/stackedcycle.py
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-02-11 09:52:24 +0000
committerDana Jansens <danakj@orodu.net>2003-02-11 09:52:24 +0000
commit6ae8608aede5e9972f19ea29ce1790a68a507ef9 (patch)
treeab1b315e32e5f3192fd42150cc6895e1cfa012a9 /scripts/stackedcycle.py
parent5af3950710c00891c4508100d59301a6903c7b79 (diff)
make stacked cycling work without a modifier-key binding, i think. cleaner checking for modifiers in motion and stackedcycle.
Diffstat (limited to 'scripts/stackedcycle.py')
-rw-r--r--scripts/stackedcycle.py19
1 files changed, 11 insertions, 8 deletions
diff --git a/scripts/stackedcycle.py b/scripts/stackedcycle.py
index 6e46503d..1667a54a 100644
--- a/scripts/stackedcycle.py
+++ b/scripts/stackedcycle.py
@@ -218,15 +218,18 @@ class _cycledata:
done = 0
notreverting = 1
# have all the modifiers this started with been released?
- if (data.action == ob.KeyAction.Release and
- not self.state & data.state):
+ if not self.state == data.state:
done = 1
- # has Escape been pressed?
- elif data.action == ob.KeyAction.Press and data.key == "Escape":
- done = 1
- notreverting = 0
- # revert
- self.menupos = 0
+ elif data.action == ob.KeyAction.Press:
+ # has Escape been pressed?
+ if data.key == "Escape":
+ done = 1
+ notreverting = 0
+ # revert
+ self.menupos = 0
+ # has Enter been pressed?
+ elif data.key == "Return":
+ done = 1
if done:
# activate, and deiconify/unshade/raise