summaryrefslogtreecommitdiff
path: root/openbox/client.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2011-07-29 15:59:22 -0400
committerDana Jansens <danakj@orodu.net>2012-09-30 15:23:14 -0400
commit52cdea653c9b3a7055bca40e4019f599d9291bb6 (patch)
treedd2c556ff0d305b432dadb8c43a4a0fc38f6e9e5 /openbox/client.c
parent34b332c22acb9f7f194eb8de80b5f4a6529e7e16 (diff)
Allow client destroy notify functions to be removed based on the data associated with them.
Diffstat (limited to 'openbox/client.c')
-rw-r--r--openbox/client.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/openbox/client.c b/openbox/client.c
index 8634707c..07db26bf 100644
--- a/openbox/client.c
+++ b/openbox/client.c
@@ -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;