X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fmainloop.c;h=b2921207b45ab716b4263c433f2d41ed0624b662;hb=f34b2571b99f40885548fc3ea7c8c5b45ba64335;hp=825d3f4febc7f0a0c321bdccc177074388c88c5f;hpb=ff78d28f8bcdbbdd42fe9501ee81185f67a4166a;p=chaz%2Fopenbox diff --git a/openbox/mainloop.c b/openbox/mainloop.c index 825d3f4f..b2921207 100644 --- a/openbox/mainloop.c +++ b/openbox/mainloop.c @@ -39,13 +39,13 @@ typedef struct _ObMainLoopFdHandlerType ObMainLoopFdHandlerType; static GSList *all_loops; /* signals are global to all loops */ -struct { +static struct { guint installed; /* a ref count */ struct sigaction oldact; } all_signals[NUM_SIGNALS]; /* a set of all possible signals */ -sigset_t all_signals_set; +static sigset_t all_signals_set; /* signals which cause a core dump, these can't be used for callbacks */ static gint core_signals[] = @@ -530,6 +530,9 @@ void ob_main_loop_timeout_add(ObMainLoop *loop, GDestroyNotify notify) { ObMainLoopTimer *t = g_new(ObMainLoopTimer, 1); + + g_assert(microseconds > 0); /* if it's 0 it'll cause an infinite loop */ + t->delay = microseconds; t->func = handler; t->data = data;