X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fkeyboard.c;h=f9716c3028f91389151dcadced0a1bdaf01103e3;hb=c8983c42a7c27321d18825f2a130c15e29046f7b;hp=6adb0aa9fa14f2cb3b0195fa914e81d4435333bc;hpb=fb2493115fd152e0f2247935eed1cbaca2f0ba6d;p=chaz%2Fopenbox diff --git a/openbox/keyboard.c b/openbox/keyboard.c index 6adb0aa9..f9716c30 100644 --- a/openbox/keyboard.c +++ b/openbox/keyboard.c @@ -159,8 +159,11 @@ gboolean keyboard_interactive_grab(guint state, ObClient *client, g_assert(action->data.any.interactive); if (!interactive_states) { - if (!grab_keyboard(TRUE)) + grab_pointer(TRUE, FALSE, OB_CURSOR_POINTER); + if (!grab_keyboard(TRUE)) { + grab_pointer(FALSE, FALSE, OB_CURSOR_NONE); return FALSE; + } } s = g_new(ObInteractiveState, 1); @@ -186,6 +189,7 @@ void keyboard_interactive_end(ObInteractiveState *s, if (!interactive_states) { grab_keyboard(FALSE); + grab_pointer(FALSE, FALSE, OB_CURSOR_NONE); keyboard_reset_chains(); } } @@ -224,7 +228,9 @@ gboolean keyboard_process_interactive_grab(const XEvent *e, ObClient **client) 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(s, e->xkey.state, cancel, e->xkey.time);