From: Dana Jansens Date: Wed, 3 Sep 2003 08:10:51 +0000 (+0000) Subject: make the client destructor a GDestroyNotify X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=5e5fdb1666ac4877ca4d26f5ca565a299bc4cc42;p=chaz%2Fopenbox make the client destructor a GDestroyNotify --- diff --git a/openbox/client.c b/openbox/client.c index 34d263b6..999b23dd 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -60,12 +60,12 @@ void client_shutdown() { } -void client_add_destructor(ObClientDestructorFunc func) +void client_add_destructor(GDestroyNotify func) { client_destructors = g_slist_prepend(client_destructors, (gpointer)func); } -void client_remove_destructor(ObClientDestructorFunc func) +void client_remove_destructor(GDestroyNotify func) { client_destructors = g_slist_remove(client_destructors, (gpointer)func); } @@ -423,7 +423,7 @@ void client_unmanage(ObClient *self) } for (it = client_destructors; it; it = g_slist_next(it)) { - ObClientDestructorFunc func = (ObClientDestructorFunc) it->data; + GDestroyNotify func = (GDestroyNotify) it->data; func(self); } diff --git a/openbox/client.h b/openbox/client.h index b28acab2..e257ad9d 100644 --- a/openbox/client.h +++ b/openbox/client.h @@ -243,10 +243,8 @@ extern GList *client_list; void client_startup(); void client_shutdown(); -typedef void (*ObClientDestructorFunc)(ObClient *c); - -void client_add_destructor(ObClientDestructorFunc func); -void client_remove_destructor(ObClientDestructorFunc func); +void client_add_destructor(GDestroyNotify func); +void client_remove_destructor(GDestroyNotify func); /*! Manages all existing windows */ void client_manage_all(); diff --git a/openbox/menu.c b/openbox/menu.c index d9541027..75380f1e 100644 --- a/openbox/menu.c +++ b/openbox/menu.c @@ -55,11 +55,11 @@ static gboolean menu_open(gchar *file, xmlDocPtr *doc, xmlNodePtr *node) return loaded; } -static void client_dest(ObClient *c) +static void client_dest(gpointer client) { /* menus can be associated with a client, so close any that are since we are disappearing now */ - menu_frame_hide_all_client(c); + menu_frame_hide_all_client(client); } void menu_startup() diff --git a/openbox/moveresize.c b/openbox/moveresize.c index 95e59587..82a9dec8 100644 --- a/openbox/moveresize.c +++ b/openbox/moveresize.c @@ -28,9 +28,9 @@ static ObCorner lockcorner; static Popup *popup = NULL; -static void client_dest(ObClient *c) +static void client_dest(gpointer client) { - if (moveresize_client == c) + if (moveresize_client == client) moveresize_end(TRUE); }