summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Reveman <davidr@novell.com>2006-09-15 16:01:08 -0400
committerDavid Reveman <davidr@novell.com>2006-09-15 16:01:08 -0400
commit7173e4c244236ea094cd8e9e7554518c16ab9f7d (patch)
tree7cf8d63c620cba4fe9d6c5fec29539a547172a50
parentefca315ceb8c221b63c3d0b812479dabe8c2638a (diff)
Allow return key to still be used for key-bindings.
-rw-r--r--src/event.c21
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;