]> Dogcows Code - chaz/openbox/commitdiff
use the right list in client_add_hide_notify, rename destructor to destroy_notify...
authorDana Jansens <danakj@orodu.net>
Sun, 13 May 2007 07:45:15 +0000 (07:45 +0000)
committerDana Jansens <danakj@orodu.net>
Sun, 13 May 2007 07:45:15 +0000 (07:45 +0000)
openbox/client.c
openbox/client.h
openbox/client_list_combined_menu.c
openbox/client_list_menu.c
openbox/event.c
openbox/focus.c
openbox/keyboard.c
openbox/mainloop.c
openbox/menu.c
openbox/moveresize.c

index 112b8d8b900623ed1dcf53772a1d801e9909a446..73696c897518dd98fce6f51df139dc7a16a21bfb 100644 (file)
@@ -64,7 +64,7 @@ typedef struct
 
 GList            *client_list          = NULL;
 
-static GSList *client_destructors      = NULL;
+static GSList *client_destroy_notifies = NULL;
 static GSList *client_hide_notifies    = NULL;
 
 static void client_get_all(ObClient *self, gboolean real);
@@ -92,7 +92,7 @@ static void client_present(ObClient *self, gboolean here, gboolean raise);
 static GSList *client_search_all_top_parents_internal(ObClient *self,
                                                       gboolean bylayer,
                                                       ObStackingLayer layer);
-static void client_call_callbacks(ObClient *self, GSList *list);
+static void client_call_notifies(ObClient *self, GSList *list);
 
 void client_startup(gboolean reconfig)
 {
@@ -106,7 +106,7 @@ void client_shutdown(gboolean reconfig)
     if (reconfig) return;
 }
 
-static void client_call_callbacks(ObClient *self, GSList *list)
+static void client_call_notifies(ObClient *self, GSList *list)
 {
     GSList *it;
 
@@ -116,23 +116,24 @@ static void client_call_callbacks(ObClient *self, GSList *list)
     }
 }
 
-void client_add_destructor(ObClientCallback func, gpointer data)
+void client_add_destroy_notify(ObClientCallback func, gpointer data)
 {
     ClientCallback *d = g_new(ClientCallback, 1);
     d->func = func;
     d->data = data;
-    client_destructors = g_slist_prepend(client_destructors, d);
+    client_destroy_notifies = g_slist_prepend(client_destroy_notifies, d);
 }
 
-void client_remove_destructor(ObClientCallback func)
+void client_remove_destroy_notify(ObClientCallback func)
 {
     GSList *it;
 
-    for (it = client_destructors; it; it = g_slist_next(it)) {
+    for (it = client_destroy_notifies; it; it = g_slist_next(it)) {
         ClientCallback *d = it->data;
         if (d->func == func) {
             g_free(d);
-            client_destructors = g_slist_delete_link(client_destructors, it);
+            client_destroy_notifies =
+                g_slist_delete_link(client_destroy_notifies, it);
             break;
         }
     }
@@ -143,7 +144,7 @@ void client_add_hide_notify(ObClientCallback func, gpointer data)
     ClientCallback *d = g_new(ClientCallback, 1);
     d->func = func;
     d->data = data;
-    client_hide_notifies = g_slist_prepend(client_destructors, d);
+    client_hide_notifies = g_slist_prepend(client_hide_notifies, d);
 }
 
 void client_remove_hide_notify(ObClientCallback func)
@@ -600,7 +601,7 @@ void client_unmanage(ObClient *self)
     if (STRUT_EXISTS(self->strut))
         screen_update_areas();
 
-    client_call_callbacks(self, client_destructors);
+    client_call_notifies(self, client_destroy_notifies);
 
     /* tell our parent(s) that we're gone */
     if (self->transient_for == OB_TRAN_GROUP) { /* transient of group */
@@ -2416,7 +2417,7 @@ void client_hide(ObClient *self)
     if (!client_should_show(self)) {
         frame_hide(self->frame);
 
-        client_call_callbacks(self, client_hide_notifies);
+        client_call_notifies(self, client_hide_notifies);
     }
 
     /* According to the ICCCM (sec 4.1.3.1) when a window is not visible, it
@@ -2435,7 +2436,7 @@ void client_showhide(ObClient *self)
     else {
         frame_hide(self->frame);
 
-        client_call_callbacks(self, client_hide_notifies);
+        client_call_notifies(self, client_hide_notifies);
     }
 
     /* According to the ICCCM (sec 4.1.3.1) when a window is not visible, it
index 1a2273f461193f94c84378ab84fa6699f64cd84a..351f063b911eb9d025d3b6aa23174bd51f27b0b4 100644 (file)
@@ -309,8 +309,8 @@ typedef void (*ObClientCallback)(ObClient *client, gpointer data);
 /* Callback functions */
 
 /*! Get notified when the client is unmanaged */
-void client_add_destructor(ObClientCallback func, gpointer data);
-void client_remove_destructor(ObClientCallback func);
+void client_add_destroy_notify(ObClientCallback func, gpointer data);
+void client_remove_destroy_notify(ObClientCallback func);
 
 /*! Get notified when the client is hidden */
 void client_add_hide_notify(ObClientCallback func, gpointer data);
index 26430f35e05c0ccebbeb58e15b0188103a986766..52ebce43b28a336e0a0ad3c505d928f1c6a705fb 100644 (file)
@@ -143,7 +143,7 @@ static void client_dest(ObClient *client, gpointer data)
 void client_list_combined_menu_startup(gboolean reconfig)
 {
     if (!reconfig)
-        client_add_destructor(client_dest, NULL);
+        client_add_destroy_notify(client_dest, NULL);
 
     combined_menu = menu_new(MENU_NAME, _("Windows"), TRUE, NULL);
     menu_set_update_func(combined_menu, self_update);
@@ -153,5 +153,5 @@ void client_list_combined_menu_startup(gboolean reconfig)
 void client_list_combined_menu_shutdown(gboolean reconfig)
 {
     if (!reconfig)
-        client_remove_destructor(client_dest);
+        client_remove_destroy_notify(client_dest);
 }
index 351790be7b9c14e3932551443c7b413980e81b89..77cfc1933121a0e31ce744a3434cc09274b715d4 100644 (file)
@@ -194,7 +194,7 @@ void client_list_menu_startup(gboolean reconfig)
     ObMenu *menu;
 
     if (!reconfig)
-        client_add_destructor(client_dest, NULL);
+        client_add_destroy_notify(client_dest, NULL);
 
     menu = menu_new(MENU_NAME, _("Desktops"), TRUE, NULL);
     menu_set_update_func(menu, self_update);
@@ -203,5 +203,5 @@ void client_list_menu_startup(gboolean reconfig)
 void client_list_menu_shutdown(gboolean reconfig)
 {
     if (!reconfig)
-        client_remove_destructor(client_dest);
+        client_remove_destroy_notify(client_dest);
 }
index 15a8e1281fb28db5ad1a64710efa427c4a0109d7..9d8c5f3c9af80e0f9ee84a48d320b32f3877828d 100644 (file)
@@ -131,7 +131,7 @@ void event_startup(gboolean reconfig)
     IceAddConnectionWatch(ice_watch, NULL);
 #endif
 
-    client_add_destructor(focus_delay_client_dest, NULL);
+    client_add_destroy_notify(focus_delay_client_dest, NULL);
 }
 
 void event_shutdown(gboolean reconfig)
@@ -142,7 +142,7 @@ void event_shutdown(gboolean reconfig)
     IceRemoveConnectionWatch(ice_watch, NULL);
 #endif
 
-    client_remove_destructor(focus_delay_client_dest);
+    client_remove_destroy_notify(focus_delay_client_dest);
 }
 
 static Window event_get_window(XEvent *e)
index 1d9ddcaa6b8283247b626fa1fbd6c793b7d6e07d..00759514eb23e92680de8ffc615eec4f55947863 100644 (file)
@@ -67,7 +67,7 @@ static gboolean valid_focus_target(ObClient *ft,
                                    gboolean all_desktops,
                                    gboolean dock_windows,
                                    gboolean desktop_windows);
-static void focus_cycle_destructor(ObClient *client, gpointer data);
+static void focus_cycle_destroy_notify(ObClient *client, gpointer data);
 static void focus_tried_hide_notify(ObClient *client, gpointer data);
 
 static Window createWindow(Window parent, gulong mask,
@@ -86,8 +86,8 @@ void focus_startup(gboolean reconfig)
     if (!reconfig) {
         XSetWindowAttributes attr;
 
-        client_add_destructor(focus_cycle_destructor, NULL);
-        client_add_destructor(focus_tried_hide_notify, NULL);
+        client_add_destroy_notify(focus_cycle_destroy_notify, NULL);
+        client_add_destroy_notify(focus_tried_hide_notify, NULL);
         client_add_hide_notify(focus_tried_hide_notify, NULL);
 
         /* start with nothing focused */
@@ -141,8 +141,8 @@ void focus_shutdown(gboolean reconfig)
     icon_popup_free(focus_cycle_popup);
 
     if (!reconfig) {
-        client_remove_destructor(focus_cycle_destructor);
-        client_remove_destructor(focus_tried_hide_notify);
+        client_remove_destroy_notify(focus_cycle_destroy_notify);
+        client_remove_destroy_notify(focus_tried_hide_notify);
         client_remove_hide_notify(focus_tried_hide_notify);
 
         /* reset focus to root */
@@ -417,7 +417,7 @@ static void popup_cycle(ObClient *c, gboolean show,
     g_free(showtext);
 }
 
-static void focus_cycle_destructor(ObClient *client, gpointer data)
+static void focus_cycle_destroy_notify(ObClient *client, gpointer data)
 {
     /* end cycling if the target disappears. CurrentTime is fine, time won't
        be used
index d758b3869e29cc8868d7b90a9d13102319d06715..1534e1983162d95b1b3d532a57c2181bd649d583 100644 (file)
@@ -324,13 +324,13 @@ void keyboard_startup(gboolean reconfig)
     popup = popup_new(FALSE);
 
     if (!reconfig)
-        client_add_destructor(keyboard_interactive_end_client, NULL);
+        client_add_destroy_notify(keyboard_interactive_end_client, NULL);
 }
 
 void keyboard_shutdown(gboolean reconfig)
 {
     if (!reconfig)
-        client_remove_destructor(keyboard_interactive_end_client);
+        client_remove_destroy_notify(keyboard_interactive_end_client);
 
     if (istate.active)
         keyboard_interactive_end(0, TRUE, 0, TRUE);
index 2af81629e429cc6abeb880c8e59dc0d883f09435..0e7b0b3cf81efca140bc7405533f3a79a2778ab8 100644 (file)
@@ -282,7 +282,7 @@ void ob_main_loop_run(ObMainLoop *loop)
     loop->run = TRUE;
     loop->running = TRUE;
 
-    client_add_destructor(ob_main_loop_client_destroy, loop);
+    client_add_destroy_notify(ob_main_loop_client_destroy, loop);
 
     while (loop->run) {
         if (loop->signal_fired) {
@@ -365,7 +365,7 @@ void ob_main_loop_run(ObMainLoop *loop)
         }
     }
 
-    client_remove_destructor(ob_main_loop_client_destroy);
+    client_remove_destroy_notify(ob_main_loop_client_destroy);
 
     loop->running = FALSE;
 }
index c6e986b970af1f97f5f65ed8e4bd167370fc5b2d..dbb0c70129417f54213ee9abd775c6cdcee44038 100644 (file)
@@ -110,13 +110,13 @@ void menu_startup(gboolean reconfig)
     g_assert(menu_parse_state.parent == NULL);
 
     if (!reconfig)
-        client_add_destructor(client_dest, NULL);
+        client_add_destroy_notify(client_dest, NULL);
 }
 
 void menu_shutdown(gboolean reconfig)
 {
     if (!reconfig)
-        client_remove_destructor(client_dest);
+        client_remove_destroy_notify(client_dest);
 
     parse_shutdown(menu_parse_inst);
     menu_parse_inst = NULL;
index 6a1e235421be94245bd65f399c9987e91eea58c0..ac51f8b6e83399675dbb24cae379f6cbeba37b1d 100644 (file)
@@ -70,7 +70,7 @@ void moveresize_startup(gboolean reconfig)
     popup = popup_new(FALSE);
 
     if (!reconfig)
-        client_add_destructor(client_dest, NULL);
+        client_add_destroy_notify(client_dest, NULL);
 }
 
 void moveresize_shutdown(gboolean reconfig)
@@ -78,7 +78,7 @@ void moveresize_shutdown(gboolean reconfig)
     if (!reconfig) {
         if (moveresize_in_progress)
             moveresize_end(FALSE);
-        client_remove_destructor(client_dest);
+        client_remove_destroy_notify(client_dest);
     }
 
     popup_free(popup);
This page took 0.043746 seconds and 4 git commands to generate.