From 319214f6c9fd58d3a9c80cdf6a3ee562575f488e Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Thu, 9 May 2024 03:14:55 +0100 Subject: [PATCH] core: remove fade_timer from session Signed-off-by: Yuxuan Shui --- src/common.h | 2 -- src/picom.c | 10 ---------- 2 files changed, 12 deletions(-) diff --git a/src/common.h b/src/common.h index 32baeb4504..821e2db7db 100644 --- a/src/common.h +++ b/src/common.h @@ -150,8 +150,6 @@ typedef struct session { ev_io xiow; /// Timeout for delayed unredirection. ev_timer unredir_timer; - /// Timer for fading - ev_timer fade_timer; /// Use an ev_timer callback for drawing ev_timer draw_timer; /// Called every time we have timeouts or new data on socket, diff --git a/src/picom.c b/src/picom.c index 2e52fe3abf..6a12d9ef45 100644 --- a/src/picom.c +++ b/src/picom.c @@ -1623,13 +1623,6 @@ static void tmout_unredir_callback(EV_P attr_unused, ev_timer *w, int revents at queue_redraw(ps); } -static void fade_timer_callback(EV_P attr_unused, ev_timer *w, int revents attr_unused) { - // TODO(yshui): do we still need the fade timer? we queue redraw automatically in - // draw_callback_impl if animation is running. - session_t *ps = session_ptr(w, fade_timer); - queue_redraw(ps); -} - static void handle_pending_updates(EV_P_ struct session *ps, double delta_t) { log_trace("Delayed handling of events, entering critical section"); auto e = xcb_request_check(ps->c.c, xcb_grab_server_checked(ps->c.c)); @@ -2418,8 +2411,6 @@ static session_t *session_init(int argc, char **argv, Display *dpy, ev_init(&ps->unredir_timer, tmout_unredir_callback); ev_init(&ps->draw_timer, draw_callback); - ev_init(&ps->fade_timer, fade_timer_callback); - // Set up SIGUSR1 signal handler to reset program ev_signal_init(&ps->usr1_signal, reset_enable, SIGUSR1); ev_signal_init(&ps->int_signal, exit_enable, SIGINT); @@ -2656,7 +2647,6 @@ static void session_destroy(session_t *ps) { // Stop libev event handlers ev_timer_stop(ps->loop, &ps->unredir_timer); - ev_timer_stop(ps->loop, &ps->fade_timer); ev_timer_stop(ps->loop, &ps->draw_timer); ev_prepare_stop(ps->loop, &ps->event_check); ev_signal_stop(ps->loop, &ps->usr1_signal);