all repos — tint2 @ f7d083904fa9b4880c2be352002aaa1b1bd7e3fc

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

Timer: do not clear timers restarted from their own callback function - fix check
o9000 mrovi9000@gmail.com
commit

f7d083904fa9b4880c2be352002aaa1b1bd7e3fc

parent

f11d30f07661d02411e08dd5251cbae275ee725b

1 files changed, 4 insertions(+), 4 deletions(-)

jump to
M src/util/timer.csrc/util/timer.c

@@ -162,10 +162,10 @@ // it's time for the callback function

t->expired = t->interval_msec == 0; t->reactivated = FALSE; t->_callback(t->arg); - if (!t->reactivated) { - // If _callback() calls stop_timeout(t) the timer 't' was freed and is not in the timeout_list - if (g_slist_find(timeout_list, t)) { - // Timer still exists + // If _callback() calls stop_timeout(t) the timer 't' was freed and is not in the timeout_list + if (g_slist_find(timeout_list, t)) { + // Timer still exists + if (!t->reactivated) { timeout_list = g_slist_remove(timeout_list, t); if (t->interval_msec > 0) { add_timeout_intern(t->interval_msec, t->interval_msec, t->_callback, t->arg, t);