X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=mod_statusbar%2Fmain.c;h=2e84bf3d3616adcb6786eaa94675e31a2124a9b8;hb=a33db24c701fe232639d904f934f68818393f95e;hp=bf0e1d0034c101fe1ef823d7a2dc24976945a6b8;hpb=471a5e5f9928e2d324b2e10422a420f458bd63ff;p=ion3.git diff --git a/mod_statusbar/main.c b/mod_statusbar/main.c index bf0e1d0..2e84bf3 100644 --- a/mod_statusbar/main.c +++ b/mod_statusbar/main.c @@ -3,10 +3,7 @@ * * Copyright (c) Tuomo Valkonen 1999-2007. * - * Ion is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; either version 2.1 of the License, or - * (at your option) any later version. + * See the included file LICENSE for details. */ #include @@ -19,15 +16,17 @@ #include #include #include +#include #include #include #include +#include #include "statusbar.h" #include "exports.h" -#define CF_STATUSD_TIMEOUT_SEC 5 +#define CF_STATUSD_TIMEOUT_SEC 3 /*{{{ Module information */ @@ -95,7 +94,7 @@ static bool wait_statusd_init(int outfd, int errfd, ExtlFn dh, ExtlFn eh) int retval; bool dummy, doneseen, eagain=FALSE; - if(gettimeofday(&endtime, NULL)!=0){ + if(mainloop_gettime(&endtime)!=0){ warn_err(); return FALSE; } @@ -147,7 +146,7 @@ static bool wait_statusd_init(int outfd, int errfd, ExtlFn dh, ExtlFn eh) goto timeout; } - if(gettimeofday(&now, NULL)!=0){ + if(mainloop_gettime(&now)!=0){ warn_err(); return FALSE; } @@ -156,8 +155,13 @@ static bool wait_statusd_init(int outfd, int errfd, ExtlFn dh, ExtlFn eh) return TRUE; timeout: - warn(TR("ion-statusd timed out.")); - return FALSE; + /* Just complain to stderr, not startup error log, and do not fail. + * The system might just be a bit slow. We can continue, but without + * initial values for the meters, geometry adjustments may be necessary + * when we finally get that information. + */ + ioncore_warn_nolog(TR("ion-statusd timed out.")); + return TRUE; } @@ -254,7 +258,7 @@ static bool clientwin_do_manage_hook(WClientWin *cwin, const WManageParams *para return FALSE; return region_manage_clientwin((WRegion*)sb, cwin, param, - MANAGE_REDIR_PREFER_NO); + MANAGE_PRIORITY_NONE); }