diff options
author | David Reveman <davidr@novell.com> | 2006-09-15 16:01:08 -0400 |
---|---|---|
committer | David Reveman <davidr@novell.com> | 2006-09-15 16:01:08 -0400 |
commit | 7173e4c244236ea094cd8e9e7554518c16ab9f7d (patch) | |
tree | 7cf8d63c620cba4fe9d6c5fec29539a547172a50 | |
parent | efca315ceb8c221b63c3d0b812479dabe8c2638a (diff) |
Allow return key to still be used for key-bindings.
-rw-r--r-- | src/event.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/event.c b/src/event.c index 5eb51527..b0e16340 100644 --- a/src/event.c +++ b/src/event.c @@ -318,12 +318,11 @@ triggerKeyPressBindings (CompDisplay *d, CompOption *argument, int nArgument) { - CompActionState state = CompActionStateInitKey; + CompActionState state = 0; CompAction *action; unsigned int modMask = REAL_MOD_MASK & ~d->ignoredModMask; unsigned int bindMods; - state = 0; if (event->xkey.keycode == d->escapeKeyCode) state = CompActionStateCancel; else if (event->xkey.keycode == d->returnKeyCode) @@ -331,19 +330,23 @@ triggerKeyPressBindings (CompDisplay *d, if (state) { - while (nOption--) + CompOption *o = option; + int n = nOption; + + while (n--) { - if (option->type == CompOptionTypeAction) + if (o->type == CompOptionTypeAction) { - if (option->value.action.terminate) - (*option->value.action.terminate) (d, &option->value.action, - state, NULL, 0); + if (o->value.action.terminate) + (*o->value.action.terminate) (d, &o->value.action, + state, NULL, 0); } - option++; + o++; } - return FALSE; + if (state == CompActionStateCancel) + return FALSE; } state = CompActionStateInitKey; |