make the client destructor a GDestroyNotify
Dana Jansens danakj@orodu.net
4 files changed,
9 insertions(+),
11 deletions(-)
M
openbox/client.c
→
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 @@ }
} for (it = client_destructors; it; it = g_slist_next(it)) { - ObClientDestructorFunc func = (ObClientDestructorFunc) it->data; + GDestroyNotify func = (GDestroyNotify) it->data; func(self); }
M
openbox/client.h
→
openbox/client.h
@@ -243,10 +243,8 @@
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();
M
openbox/moveresize.c
→
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); }