]> Dogcows Code - chaz/openbox/commitdiff
Allow client destroy notify functions to be removed based on the data associated...
authorDana Jansens <danakj@orodu.net>
Fri, 29 Jul 2011 19:59:22 +0000 (15:59 -0400)
committerDana Jansens <danakj@orodu.net>
Sun, 30 Sep 2012 19:23:14 +0000 (15:23 -0400)
openbox/client.c
openbox/client.h

index 8634707c19e5bc0a0d03534ee58ed15da97eef33..07db26bfa7040e2f318f2d8fa170e94b374345a4 100644 (file)
@@ -167,6 +167,21 @@ void client_remove_destroy_notify(ObClientCallback func)
     }
 }
 
+void client_remove_destroy_notify_data(ObClientCallback func, gpointer data)
+{
+    GSList *it;
+
+    for (it = client_destroy_notifies; it; it = g_slist_next(it)) {
+        ClientCallback *d = it->data;
+        if (d->func == func && d->data == data) {
+            g_slice_free(ClientCallback, d);
+            client_destroy_notifies =
+                g_slist_delete_link(client_destroy_notifies, it);
+            break;
+        }
+    }
+}
+
 void client_set_list(void)
 {
     Window *windows, *win_it;
index d5b344ff5dfce01f5311553220b920d604013dbb..18c88ec1bbf16829e7da604c3e796e13003342b7 100644 (file)
@@ -326,6 +326,7 @@ typedef void (*ObClientCallback)(ObClient *client, gpointer data);
 /*! Get notified when the client is unmanaged */
 void client_add_destroy_notify(ObClientCallback func, gpointer data);
 void client_remove_destroy_notify(ObClientCallback func);
+void client_remove_destroy_notify_data(ObClientCallback func, gpointer data);
 
 /*! Manages a given window
   @param prompt This specifies an ObPrompt which is being managed.  It is
This page took 0.034003 seconds and 4 git commands to generate.