]> Dogcows Code - chaz/openbox/blobdiff - plugins/mouse/mouse.c
add sloppy focus
[chaz/openbox] / plugins / mouse / mouse.c
index 5dd39db39d59597a02200e02ed929c06b92ec97e..aeb3c59240066091ba944890542460ce9a5a4771 100644 (file)
@@ -78,7 +78,8 @@ static void foreach_clear(GQuark key, gpointer data, gpointer user_data)
 
         MouseBinding *b = it->data;
        for (i = 0; i < NUM_MOUSEACTION; ++i)
-            action_free(b->action[i]);
+            if (b->action[i] != NULL)
+                action_free(b->action[i]);
         g_free(b);
     }
     g_slist_free(data);
@@ -226,6 +227,7 @@ static void event(ObEvent *e, void *foo)
                             e->data.x.client, e->data.x.e->xbutton.state,
                             e->data.x.e->xbutton.button,
                             cx, cy, cw, ch, dx, dy, TRUE, corner);
+                drag = FALSE;
             }
 
             /* clicks are only valid if its released over the window */
@@ -328,8 +330,7 @@ static gboolean mbind(char *buttonstr, char *contextstr, MouseAction mact,
     b->state = state;
     b->button = button;
     for (i = 0; i < NUM_MOUSEACTION; ++i)
-        if (i != mact)
-            b->action[i] = NULL;
+        b->action[i] = NULL;
     b->action[mact] = action;
     g_datalist_id_set_data(&bound_contexts, context, 
         g_slist_append(g_datalist_id_get_data(&bound_contexts, context), b));
This page took 0.023725 seconds and 4 git commands to generate.