Merge branch 'obsd-master'

This commit is contained in:
Thomas Adam 2017-07-14 10:01:11 +01:00
commit 1265e212e4
2 changed files with 20 additions and 25 deletions

14
proc.c
View File

@ -253,13 +253,13 @@ proc_clear_signals(struct tmuxproc *tp)
sigaction(SIGPIPE, &sa, NULL);
sigaction(SIGTSTP, &sa, NULL);
event_del(&tp->ev_sighup);
event_del(&tp->ev_sigchld);
event_del(&tp->ev_sigcont);
event_del(&tp->ev_sigterm);
event_del(&tp->ev_sigusr1);
event_del(&tp->ev_sigusr2);
event_del(&tp->ev_sigwinch);
signal_del(&tp->ev_sighup);
signal_del(&tp->ev_sigchld);
signal_del(&tp->ev_sigcont);
signal_del(&tp->ev_sigterm);
signal_del(&tp->ev_sigusr1);
signal_del(&tp->ev_sigusr2);
signal_del(&tp->ev_sigwinch);
}
struct tmuxpeer *

View File

@ -1331,28 +1331,23 @@ server_client_check_redraw(struct client *c)
}
}
}
if (needed) {
left = EVBUFFER_LENGTH(tty->out);
if (left != 0) {
log_debug("%s: redraw deferred (%zu left)", c->name, left);
if (evtimer_initialized(&ev) && evtimer_pending(&ev, NULL))
return;
log_debug("redraw timer started");
if (needed && (left = EVBUFFER_LENGTH(tty->out)) != 0) {
log_debug("%s: redraw deferred (%zu left)", c->name, left);
if (!evtimer_initialized(&ev))
evtimer_set(&ev, server_client_redraw_timer, NULL);
if (!evtimer_pending(&ev, NULL)) {
log_debug("redraw timer started");
evtimer_add(&ev, &tv);
/*
* We may have got here for a single pane redraw, but
* force a full redraw next time in case other panes
* have been updated.
*/
c->flags |= CLIENT_REDRAW;
return;
}
if (evtimer_initialized(&ev))
evtimer_del(&ev);
/*
* We may have got here for a single pane redraw, but force a
* full redraw next time in case other panes have been updated.
*/
c->flags |= CLIENT_REDRAW;
return;
} else if (needed)
log_debug("%s: redraw needed", c->name);
}
if (c->flags & (CLIENT_REDRAW|CLIENT_STATUS)) {
if (options_get_number(s->options, "set-titles"))