all repos — tint2 @ b539c0a1c062d61eab279e749df729788bd2bf93

fork of the tint2 desktop panel for my custom setup - only minimized windows across all desktops for the taskbar

fix crash if bad config path given #719
Chris Lee @klee93
commit

b539c0a1c062d61eab279e749df729788bd2bf93

parent

970c59779648f24663858e4b22f3841e35519097

3 files changed, 5 insertions(+), 2 deletions(-)

jump to
M src/init.csrc/init.c

@@ -247,8 +247,9 @@ init_X11_pre_config();

if (!config_read()) { fprintf(stderr, "tint2: Could not read config file.\n"); print_usage(); + warnings_for_timers = false; cleanup(); - return; + exit(EXIT_FAILURE); } init_post_config();
M src/util/timer.csrc/util/timer.c

@@ -25,6 +25,7 @@ #include "colors.h"

#include "timer.h" #include "test.h" +bool warnings_for_timers = true; bool debug_timers = false; #define MOCK_ORIGIN 1000000

@@ -59,7 +60,7 @@ }

void destroy_timer(Timer *timer) { - if (!g_list_find(timers, timer)) { + if (warnings_for_timers && !g_list_find(timers, timer)) { fprintf(stderr, RED "tint2: Attempt to destroy nonexisting timer: %s" RESET "\n", timer->name_); return; }
M src/util/timer.hsrc/util/timer.h

@@ -23,6 +23,7 @@ #include <time.h>

#include <sys/time.h> #include "bool.h" +extern bool warnings_for_timers; extern bool debug_timers; typedef void TimerCallback(void *arg);