]> Dogcows Code - chaz/openbox/commitdiff
make the client destructor a GDestroyNotify
authorDana Jansens <danakj@orodu.net>
Wed, 3 Sep 2003 08:10:51 +0000 (08:10 +0000)
committerDana Jansens <danakj@orodu.net>
Wed, 3 Sep 2003 08:10:51 +0000 (08:10 +0000)
openbox/client.c
openbox/client.h
openbox/menu.c
openbox/moveresize.c

index 34d263b6364b04f7720ab991415bbf099c89e37d..999b23dd287b01a85d4cb3262aaf90a9993e7323 100644 (file)
@@ -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);
     }
         
index b28acab2dbe77aca7999128c095142b840c7232b..e257ad9ddd0c130d23b98ce3f9ada9685a8732cb 100644 (file)
@@ -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();
index d954102762dc1d1309d8749208ccb4e70c7d79db..75380f1eb42c3b2fb380136164150fc0c72dc63b 100644 (file)
@@ -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()
index 95e595872476af8dea1e0ae208d2257aae7356cc..82a9dec8d6174f2e66c9895a37b2ca83a3399f56 100644 (file)
@@ -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);    
 }
 
This page took 0.034917 seconds and 4 git commands to generate.