Skip to content

Commit

Permalink
core: remove fade_timer from session
Browse files Browse the repository at this point in the history
Signed-off-by: Yuxuan Shui <[email protected]>
  • Loading branch information
yshui committed May 9, 2024
1 parent b64e244 commit 7010c8c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
2 changes: 0 additions & 2 deletions src/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
10 changes: 0 additions & 10 deletions src/picom.c
Original file line number Diff line number Diff line change
Expand Up @@ -1619,13 +1619,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));
Expand Down Expand Up @@ -2414,8 +2407,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);
Expand Down Expand Up @@ -2652,7 +2643,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);
Expand Down

0 comments on commit 7010c8c

Please sign in to comment.