From d389e67d22259e6a1d822b99ab0dbd27389bdade Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Thu, 3 May 2007 04:23:55 +0000 Subject: [PATCH] yeah.. so much for lucky 6000 --- openbox/keyboard.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/openbox/keyboard.c b/openbox/keyboard.c index bee264f6..30e1e691 100644 --- a/openbox/keyboard.c +++ b/openbox/keyboard.c @@ -240,22 +240,24 @@ gboolean keyboard_process_interactive_grab(const XEvent *e, ObClient **client) gboolean done = FALSE; gboolean cancel = FALSE; - if ((e->type == KeyRelease && !(istate.state & e->xkey.state))) - done = TRUE; - else if (e->type == KeyPress) { - /*if (e->xkey.keycode == ob_keycode(OB_KEY_RETURN)) - done = TRUE; - else */if (e->xkey.keycode == ob_keycode(OB_KEY_ESCAPE)) - cancel = done = TRUE; - } else if (e->type == ButtonPress) - cancel = done = TRUE; - - if (done) { - keyboard_interactive_end(e->xkey.state, cancel, e->xkey.time, TRUE); - - handled = TRUE; - } else - *client = istate.client; + if (istate.active) { + if ((e->type == KeyRelease && !(istate.state & e->xkey.state))) + done = TRUE; + else if (e->type == KeyPress) { + /*if (e->xkey.keycode == ob_keycode(OB_KEY_RETURN)) + done = TRUE; + else */if (e->xkey.keycode == ob_keycode(OB_KEY_ESCAPE)) + cancel = done = TRUE; + } else if (e->type == ButtonPress) + cancel = done = TRUE; + + if (done) { + keyboard_interactive_end(e->xkey.state, cancel, e->xkey.time,TRUE); + + handled = TRUE; + } else + *client = istate.client; + } return handled; } @@ -324,8 +326,6 @@ void keyboard_startup(gboolean reconfig) void keyboard_shutdown(gboolean reconfig) { - GSList *it; - if (!reconfig) client_remove_destructor(keyboard_interactive_end_client); -- 2.45.2