From: Dana Jansens Date: Mon, 8 Sep 2003 17:25:51 +0000 (+0000) Subject: grab the pointer befoer shading a window to prevent focus moving in sloppy focus X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=e5f27bd25ecc3fbabbba8766168211d71d0d0397;p=chaz%2Fopenbox grab the pointer befoer shading a window to prevent focus moving in sloppy focus --- diff --git a/openbox/action.c b/openbox/action.c index e0f411e0..6d1e0a64 100644 --- a/openbox/action.c +++ b/openbox/action.c @@ -866,9 +866,11 @@ void action_raise(union ActionData *data) void action_unshaderaise(union ActionData *data) { if (data->client.any.c) { - if (data->client.any.c->shaded) + if (data->client.any.c->shaded) { + grab_pointer(TRUE, OB_CURSOR_NONE); client_shade(data->client.any.c, FALSE); - else + grab_pointer(FALSE, OB_CURSOR_NONE); + } else stacking_raise(CLIENT_AS_WINDOW(data->client.any.c)); } } @@ -878,8 +880,11 @@ void action_shadelower(union ActionData *data) if (data->client.any.c) { if (data->client.any.c->shaded) stacking_lower(CLIENT_AS_WINDOW(data->client.any.c)); - else + else { + grab_pointer(TRUE, OB_CURSOR_NONE); client_shade(data->client.any.c, TRUE); + grab_pointer(FALSE, OB_CURSOR_NONE); + } } } @@ -903,20 +908,29 @@ void action_kill(union ActionData *data) void action_shade(union ActionData *data) { - if (data->client.any.c) + if (data->client.any.c) { + grab_pointer(TRUE, OB_CURSOR_NONE); client_shade(data->client.any.c, TRUE); + grab_pointer(FALSE, OB_CURSOR_NONE); + } } void action_unshade(union ActionData *data) { - if (data->client.any.c) + if (data->client.any.c) { + grab_pointer(TRUE, OB_CURSOR_NONE); client_shade(data->client.any.c, FALSE); + grab_pointer(FALSE, OB_CURSOR_NONE); + } } void action_toggle_shade(union ActionData *data) { - if (data->client.any.c) + if (data->client.any.c) { + grab_pointer(TRUE, OB_CURSOR_NONE); client_shade(data->client.any.c, !data->client.any.c->shaded); + grab_pointer(FALSE, OB_CURSOR_NONE); + } } void action_toggle_omnipresent(union ActionData *data)