From: Dana Jansens Date: Wed, 3 Sep 2003 08:11:38 +0000 (+0000) Subject: dont grab frame context mouse bindings on desktop windows X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=91e04979a675a75d3f20de98bf070c9fb1d8f3fa;p=chaz%2Fopenbox dont grab frame context mouse bindings on desktop windows --- diff --git a/openbox/mouse.c b/openbox/mouse.c index e8b6aec0..988e0147 100644 --- a/openbox/mouse.c +++ b/openbox/mouse.c @@ -18,6 +18,8 @@ typedef struct { GSList *actions[OB_MOUSE_NUM_ACTIONS]; /* lists of Action pointers */ } ObMouseBinding; +#define FRAME_CONTEXT(co, cl) ((cl && cl->type != OB_CLIENT_TYPE_DESKTOP) ? \ + co == OB_FRAME_CONTEXT_FRAME : FALSE) #define CLIENT_CONTEXT(co, cl) ((cl && cl->type == OB_CLIENT_TYPE_DESKTOP) ? \ co == OB_FRAME_CONTEXT_DESKTOP : \ co == OB_FRAME_CONTEXT_CLIENT) @@ -38,7 +40,7 @@ void mouse_grab_for_client(ObClient *client, gboolean grab) int mode; unsigned int mask; - if (i == OB_FRAME_CONTEXT_FRAME) { + if (FRAME_CONTEXT(i, client)) { win = client->frame->window; mode = GrabModeAsync; mask = ButtonPressMask | ButtonMotionMask | ButtonReleaseMask;