diff options
| author | Mikael Magnusson <mikachu@comhem.se> | 2006-08-17 20:16:02 +0000 |
|---|---|---|
| committer | Mikael Magnusson <mikachu@comhem.se> | 2006-08-17 20:16:02 +0000 |
| commit | 7b7f158088fa548791922b7cf133e507d3873656 (patch) | |
| tree | bce9662a72c1af3dc3fefa1cd7b94d634f22cb3e /openbox/mainloop.c | |
| parent | 1b4ff4e93f8bc312a862d3f08afeb0f4809527ae (diff) | |
add a means to tell the timer destroy function not to fire when for example freeing its client frame
Diffstat (limited to 'openbox/mainloop.c')
| -rw-r--r-- | openbox/mainloop.c | 10 |
1 files changed, 6 insertions, 4 deletions
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; + } } } |
