From 7b7f158088fa548791922b7cf133e507d3873656 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Thu, 17 Aug 2006 20:16:02 +0000 Subject: add a means to tell the timer destroy function not to fire when for example freeing its client frame --- openbox/mainloop.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'openbox/mainloop.c') diff --git a/openbox/mainloop.c b/openbox/mainloop.c index 9676f07e..b59564a2 100644 --- a/openbox/mainloop.c +++ b/openbox/mainloop.c @@ -608,16 +608,18 @@ void ob_main_loop_timeout_remove(ObMainLoop *loop, } } -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; + } } } -- cgit v1.2.3