summaryrefslogtreecommitdiff
path: root/openbox/keyboard.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2010-01-08 10:45:24 -0500
committerDana Jansens <danakj@orodu.net>2010-01-08 10:45:24 -0500
commit3368b91d544ab8c6510d88e5ad58d070fad62baa (patch)
tree3eaf5bc850e025bffb5d29a6e7e31693e89ec265 /openbox/keyboard.c
parent73575c10ce3ede1637e4f959b56e1f7d5f110b91 (diff)
Don't handle input events on prompts if they should be used for a binding/menu instead.
Also, be more careful about making the prompt buttons look pressed, don't make them pressed from a motion notify event if they didnt first handle the press.
Diffstat (limited to 'openbox/keyboard.c')
-rw-r--r--openbox/keyboard.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/openbox/keyboard.c b/openbox/keyboard.c
index a342d1ef..5f7531e3 100644
--- a/openbox/keyboard.c
+++ b/openbox/keyboard.c
@@ -204,13 +204,14 @@ gboolean keyboard_process_interactive_grab(const XEvent *e, ObClient **client)
}
#endif
-void keyboard_event(ObClient *client, const XEvent *e)
+gboolean keyboard_event(ObClient *client, const XEvent *e)
{
KeyBindingTree *p;
+ gboolean used;
if (e->type == KeyRelease) {
grab_key_passive_count(-1);
- return;
+ return FALSE;
}
g_assert(e->type == KeyPress);
@@ -221,9 +222,10 @@ void keyboard_event(ObClient *client, const XEvent *e)
{
obt_main_loop_timeout_remove(ob_main_loop, chain_timeout);
keyboard_reset_chains(-1);
- return;
+ return TRUE;
}
+ used = FALSE;
if (curpos == NULL)
p = keyboard_firstnode;
else
@@ -258,9 +260,11 @@ void keyboard_event(ObClient *client, const XEvent *e)
0, OB_FRAME_CONTEXT_NONE, client);
}
break;
+ used = TRUE;
}
p = p->next_sibling;
}
+ return used;
}
static void node_rebind(KeyBindingTree *node)