]> Dogcows Code - chaz/openbox/blobdiff - openbox/mainloop.c
consistant glib type usage
[chaz/openbox] / openbox / mainloop.c
index f9aaf5ed8b71fd323a0ae362929be475db28edff..0dd3b6b8b4e881497ff3ecc92b755774b5347bfc 100644 (file)
@@ -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;
         }
This page took 0.020182 seconds and 4 git commands to generate.