if (config_focus_follow && config_focus_delay)
ob_main_loop_timeout_remove_data(ob_main_loop,
focus_delay_func,
- client);
+ client, TRUE);
break;
default:
break;
static void focus_delay_client_dest(ObClient *client, gpointer data)
{
- ob_main_loop_timeout_remove_data(ob_main_loop, focus_delay_func, client);
+ ob_main_loop_timeout_remove_data(ob_main_loop, focus_delay_func, client, TRUE);
}
static void event_client_dest(ObClient *client, gpointer data)
g_hash_table_remove(window_map, &self->tlresize);
g_hash_table_remove(window_map, &self->trresize);
- ob_main_loop_timeout_remove_data(ob_main_loop, flash_timeout, self);
+ ob_main_loop_timeout_remove_data(ob_main_loop, flash_timeout, self, TRUE);
frame_free(self);
}
}
}
-void ob_main_loop_timeout_remove_data(ObMainLoop *loop,
- GSourceFunc handler,
- gpointer data)
+void ob_main_loop_timeout_remove_data(ObMainLoop *loop, GSourceFunc handler,
+ gpointer data, gboolean cancel_dest)
{
GSList *it;
for (it = loop->timers; it; it = g_slist_next(it)) {
ObMainLoopTimer *t = it->data;
- if (t->func == handler && t->data == data)
+ if (t->func == handler && t->data == data) {
t->del_me = TRUE;
+ if (cancel_dest)
+ t->destroy = NULL;
+ }
}
}
GSourceFunc handler);
void ob_main_loop_timeout_remove_data(ObMainLoop *loop,
GSourceFunc handler,
- gpointer data);
+ gpointer data,
+ gboolean cancel_dest);
struct _ObAction;
case SN_MONITOR_EVENT_CANCELED:
if ((d = wait_find(sn_startup_sequence_get_id(seq)))) {
d->feedback = FALSE;
- ob_main_loop_timeout_remove_data(ob_main_loop, sn_wait_timeout, d);
+ ob_main_loop_timeout_remove_data(ob_main_loop, sn_wait_timeout, d, FALSE);
change = TRUE;
}
break;