diff --git a/src/picom.c b/src/picom.c index ca049748..4de2f658 100644 --- a/src/picom.c +++ b/src/picom.c @@ -1895,8 +1895,11 @@ static void draw_callback_impl(EV_P_ session_t *ps, int revents attr_unused) { static void draw_callback(EV_P_ ev_timer *w, int revents) { session_t *ps = session_ptr(w, draw_timer); - draw_callback_impl(EV_A_ ps, revents); + // The draw timer has to be stopped before calling the draw_callback_impl + // function because it may be set and started there, e.g. when a custom + // animated shader is used. ev_timer_stop(EV_A_ w); + draw_callback_impl(EV_A_ ps, revents); // Immediately start next frame if we are in benchmark mode. if (ps->o.benchmark) {