Merge branch 'obsd-master'

This commit is contained in:
Thomas Adam 2020-01-28 10:01:25 +00:00
commit 7cdf5ee9bc
4 changed files with 10 additions and 5 deletions

View File

@ -363,14 +363,15 @@ recalculate_sizes(void)
* client. * client.
*/ */
TAILQ_FOREACH(c, &clients, entry) { TAILQ_FOREACH(c, &clients, entry) {
s = c->session;
if (s != NULL && !(c->flags & CLIENT_UNATTACHEDFLAGS))
s->attached++;
if (ignore_client_size(c)) if (ignore_client_size(c))
continue; continue;
s = c->session;
if (c->tty.sy <= s->statuslines || (c->flags & CLIENT_CONTROL)) if (c->tty.sy <= s->statuslines || (c->flags & CLIENT_CONTROL))
c->flags |= CLIENT_STATUSOFF; c->flags |= CLIENT_STATUSOFF;
else else
c->flags &= ~CLIENT_STATUSOFF; c->flags &= ~CLIENT_STATUSOFF;
s->attached++;
} }
/* Walk each window and adjust the size. */ /* Walk each window and adjust the size. */

View File

@ -1032,7 +1032,7 @@ server_client_key_callback(struct cmdq_item *item, void *data)
key_code key0; key_code key0;
/* Check the client is good to accept input. */ /* Check the client is good to accept input. */
if (s == NULL || (c->flags & (CLIENT_DEAD|CLIENT_SUSPENDED)) != 0) if (s == NULL || (c->flags & CLIENT_UNATTACHEDFLAGS))
goto out; goto out;
wl = s->curw; wl = s->curw;
@ -1219,7 +1219,7 @@ server_client_handle_key(struct client *c, struct key_event *event)
struct cmdq_item *item; struct cmdq_item *item;
/* Check the client is good to accept input. */ /* Check the client is good to accept input. */
if (s == NULL || (c->flags & (CLIENT_DEAD|CLIENT_SUSPENDED)) != 0) if (s == NULL || (c->flags & CLIENT_UNATTACHEDFLAGS))
return (0); return (0);
/* /*

4
tmux.h
View File

@ -1584,6 +1584,10 @@ struct client {
CLIENT_REDRAWSTATUSALWAYS| \ CLIENT_REDRAWSTATUSALWAYS| \
CLIENT_REDRAWBORDERS| \ CLIENT_REDRAWBORDERS| \
CLIENT_REDRAWOVERLAY) CLIENT_REDRAWOVERLAY)
#define CLIENT_UNATTACHEDFLAGS \
(CLIENT_DEAD| \
CLIENT_SUSPENDED| \
CLIENT_DETACHING)
#define CLIENT_NOSIZEFLAGS \ #define CLIENT_NOSIZEFLAGS \
(CLIENT_DEAD| \ (CLIENT_DEAD| \
CLIENT_SUSPENDED| \ CLIENT_SUSPENDED| \

View File

@ -210,7 +210,7 @@ window_client_draw(__unused void *modedata, void *itemdata,
struct window_pane *wp; struct window_pane *wp;
u_int cx = s->cx, cy = s->cy, lines, at; u_int cx = s->cx, cy = s->cy, lines, at;
if (c->session == NULL || (c->flags & (CLIENT_DEAD|CLIENT_DETACHING))) if (c->session == NULL || (c->flags & CLIENT_UNATTACHEDFLAGS))
return; return;
wp = c->session->curw->window->active; wp = c->session->curw->window->active;