summaryrefslogtreecommitdiff
path: root/openbox/timer.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbox/timer.c')
-rw-r--r--openbox/timer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/openbox/timer.c b/openbox/timer.c
index b49f4dea..33f4bab7 100644
--- a/openbox/timer.c
+++ b/openbox/timer.c
@@ -56,6 +56,7 @@ ObTimer *timer_start(long delay, ObTimeoutHandler cb, void *data)
self->action = cb;
self->data = data;
self->del_me = FALSE;
+ g_get_current_time(&now);
self->last = self->timeout = now;
g_time_val_add(&self->timeout, delay);
@@ -117,7 +118,7 @@ void timer_dispatch(GTimeVal **wait)
*/
timers = g_slist_delete_link(timers, timers);
g_time_val_add(&curr->last, curr->delay);
- curr->action(curr->data);
+ curr->action(curr, curr->data);
g_time_val_add(&curr->timeout, curr->delay);
insert_timer(curr);