From 79e189dbac9ec5ae5baed26515ee60b8dce9a079 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sat, 9 Aug 2003 04:56:12 +0000 Subject: changes to the timer api, pass the timer to the callback function. add a desktop-switch popup with the desktop's name --- openbox/timer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'openbox/timer.c') 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); -- cgit v1.2.3