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);
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)
{
if (reconfig) return;
}
-static void client_call_callbacks(ObClient *self, GSList *list)
+static void client_call_notifies(ObClient *self, GSList *list)
{
GSList *it;
}
}
-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;
}
}
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)
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 */
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
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
/* 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);
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);
void client_list_combined_menu_shutdown(gboolean reconfig)
{
if (!reconfig)
- client_remove_destructor(client_dest);
+ client_remove_destroy_notify(client_dest);
}
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);
void client_list_menu_shutdown(gboolean reconfig)
{
if (!reconfig)
- client_remove_destructor(client_dest);
+ client_remove_destroy_notify(client_dest);
}
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)
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)
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,
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 */
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 */
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
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);
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) {
}
}
- client_remove_destructor(ob_main_loop_client_destroy);
+ client_remove_destroy_notify(ob_main_loop_client_destroy);
loop->running = FALSE;
}
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;
popup = popup_new(FALSE);
if (!reconfig)
- client_add_destructor(client_dest, NULL);
+ client_add_destroy_notify(client_dest, NULL);
}
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);