mirror of https://github.com/yshui/picom.git
picom: fix custom animated shaders
the draw timer has to be stopped before calling the draw_callback_impl function because when there's a custom animated shader it calls the queue_redraw funtion that calls the schedule_render function that sets and starts the draw timer that gets immediately stopped otherwise. this fixes the screen not being redirected back with unredir-if-possible and a custom animated shader and only the first frame being drawn with vsync, no-frame-pacing and a custom animated shader.
This commit is contained in:
parent
c78948cc47
commit
a7ca0b4081
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue