summaryrefslogtreecommitdiff
path: root/openbox/mainloop.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbox/mainloop.c')
-rw-r--r--openbox/mainloop.c10
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;
+ }
}
}