]> Dogcows Code - chaz/openbox/commitdiff
dont grab frame context mouse bindings on desktop windows
authorDana Jansens <danakj@orodu.net>
Wed, 3 Sep 2003 08:11:38 +0000 (08:11 +0000)
committerDana Jansens <danakj@orodu.net>
Wed, 3 Sep 2003 08:11:38 +0000 (08:11 +0000)
openbox/mouse.c

index e8b6aec0b855956bb8d84ebecf7a8d16dff782c9..988e0147acee9dc169edda25323f20cbbe8d44bd 100644 (file)
@@ -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;
This page took 0.026529 seconds and 4 git commands to generate.