mirror of
https://github.com/tmux/tmux.git
synced 2025-12-21 14:56:05 +00:00
Newer libevents do not allow event_del on a zero'd event.
This commit is contained in:
7
tty.c
7
tty.c
@@ -35,6 +35,8 @@
|
|||||||
|
|
||||||
static int tty_log_fd = -1;
|
static int tty_log_fd = -1;
|
||||||
|
|
||||||
|
static void tty_start_timer_callback(int, short, void *);
|
||||||
|
static void tty_clipboard_query_callback(int, short, void *);
|
||||||
static void tty_set_italics(struct tty *);
|
static void tty_set_italics(struct tty *);
|
||||||
static int tty_try_colour(struct tty *, int, const char *);
|
static int tty_try_colour(struct tty *, int, const char *);
|
||||||
static void tty_force_cursor_colour(struct tty *, int);
|
static void tty_force_cursor_colour(struct tty *, int);
|
||||||
@@ -291,6 +293,8 @@ tty_open(struct tty *tty, char **cause)
|
|||||||
if (tty->out == NULL)
|
if (tty->out == NULL)
|
||||||
fatal("out of memory");
|
fatal("out of memory");
|
||||||
|
|
||||||
|
evtimer_set(&tty->clipboard_timer, tty_clipboard_query_callback, tty);
|
||||||
|
evtimer_set(&tty->start_timer, tty_start_timer_callback, tty);
|
||||||
evtimer_set(&tty->timer, tty_timer_callback, tty);
|
evtimer_set(&tty->timer, tty_timer_callback, tty);
|
||||||
|
|
||||||
tty_start_tty(tty);
|
tty_start_tty(tty);
|
||||||
@@ -322,7 +326,6 @@ tty_start_start_timer(struct tty *tty)
|
|||||||
|
|
||||||
log_debug("%s: start timer started", c->name);
|
log_debug("%s: start timer started", c->name);
|
||||||
evtimer_del(&tty->start_timer);
|
evtimer_del(&tty->start_timer);
|
||||||
evtimer_set(&tty->start_timer, tty_start_timer_callback, tty);
|
|
||||||
evtimer_add(&tty->start_timer, &tv);
|
evtimer_add(&tty->start_timer, &tv);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -440,6 +443,7 @@ tty_stop_tty(struct tty *tty)
|
|||||||
tty->flags &= ~TTY_STARTED;
|
tty->flags &= ~TTY_STARTED;
|
||||||
|
|
||||||
evtimer_del(&tty->start_timer);
|
evtimer_del(&tty->start_timer);
|
||||||
|
evtimer_del(&tty->clipboard_timer);
|
||||||
|
|
||||||
event_del(&tty->timer);
|
event_del(&tty->timer);
|
||||||
tty->flags &= ~TTY_BLOCK;
|
tty->flags &= ~TTY_BLOCK;
|
||||||
@@ -3106,6 +3110,5 @@ tty_clipboard_query(struct tty *tty)
|
|||||||
tty_putcode_ss(tty, TTYC_MS, "", "?");
|
tty_putcode_ss(tty, TTYC_MS, "", "?");
|
||||||
|
|
||||||
tty->flags |= TTY_OSC52QUERY;
|
tty->flags |= TTY_OSC52QUERY;
|
||||||
evtimer_set(&tty->clipboard_timer, tty_clipboard_query_callback, tty);
|
|
||||||
evtimer_add(&tty->clipboard_timer, &tv);
|
evtimer_add(&tty->clipboard_timer, &tv);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user