Add a define for flags meaning a client is not attached, and fix

unattached counter, reported by Thomas Sattler.
This commit is contained in:
nicm
2020-01-28 08:06:11 +00:00
parent 2c38e01b54
commit 24350879cd
4 changed files with 10 additions and 5 deletions

View File

@ -1034,7 +1034,7 @@ server_client_key_callback(struct cmdq_item *item, void *data)
key_code key0;
/* 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;
wl = s->curw;
@ -1221,7 +1221,7 @@ server_client_handle_key(struct client *c, struct key_event *event)
struct cmdq_item *item;
/* 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);
/*