]> Dogcows Code - chaz/openbox/blobdiff - openbox/mouse.c
remove all the startup notification code from screen.c
[chaz/openbox] / openbox / mouse.c
index e8b6aec0b855956bb8d84ebecf7a8d16dff782c9..ace7bca0c59aca82b172dd5b539d5398ed1bfe12 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;
@@ -51,7 +53,8 @@ void mouse_grab_for_client(ObClient *client, gboolean grab)
             } else continue;
 
             if (grab)
-                grab_button_full(b->button, b->state, win, mask, mode, None);
+                grab_button_full(b->button, b->state, win, mask, mode,
+                                 OB_CURSOR_NONE);
             else
                 ungrab_button(b->button, b->state, win);
         }
@@ -85,6 +88,7 @@ static void clearall()
             g_free(b);
         }
         g_slist_free(bound_contexts[i]);
+        bound_contexts[i] = NULL;
     }
 }
 
@@ -365,11 +369,11 @@ gboolean mouse_bind(char *buttonstr, char *contextstr, ObMouseAction mact,
     return TRUE;
 }
 
-void mouse_startup()
+void mouse_startup(gboolean reconfig)
 {
 }
 
-void mouse_shutdown()
+void mouse_shutdown(gboolean reconfig)
 {
     grab_all_clients(FALSE);
     clearall();
This page took 0.024723 seconds and 4 git commands to generate.