From 3368b91d544ab8c6510d88e5ad58d070fad62baa Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 8 Jan 2010 10:45:24 -0500 Subject: 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. --- openbox/keyboard.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'openbox/keyboard.c') 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) -- cgit v1.2.3