X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=openbox%2Fmainloop.c;h=0dd3b6b8b4e881497ff3ecc92b755774b5347bfc;hb=7c827e16ba99824a6a3862c6f72d2102f5abc5c2;hp=f9aaf5ed8b71fd323a0ae362929be475db28edff;hpb=783f5aed00e65ddad29248b7258a5e1fb8ac29cd;p=chaz%2Fopenbox diff --git a/openbox/mainloop.c b/openbox/mainloop.c index f9aaf5ed..0dd3b6b8 100644 --- a/openbox/mainloop.c +++ b/openbox/mainloop.c @@ -565,9 +565,9 @@ void ob_main_loop_fd_remove(ObMainLoop *loop, #define NEAREST_TIMEOUT(loop) \ (((ObMainLoopTimer*)(loop)->timers->data)->timeout) -static long timecompare(GTimeVal *a, GTimeVal *b) +static glong timecompare(GTimeVal *a, GTimeVal *b) { - long r; + glong r; if ((r = b->tv_sec - a->tv_sec)) return r; return b->tv_usec - a->tv_usec; @@ -674,6 +674,8 @@ static void timer_dispatch(ObMainLoop *loop, GTimeVal **wait) if (curr->del_me) { /* delete the top */ loop->timers = g_slist_delete_link(loop->timers, it); + if (curr->destroy) + curr->destroy(curr->data); g_free(curr); continue; }