aboutsummaryrefslogtreecommitdiff
path: root/server-client.c
diff options
context:
space:
mode:
Diffstat (limited to 'server-client.c')
-rw-r--r--server-client.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/server-client.c b/server-client.c
index e9587e4c..66d0d577 100644
--- a/server-client.c
+++ b/server-client.c
@@ -1588,10 +1588,6 @@ server_client_check_pane_focus(struct window_pane *wp)
if (wp->window->active != wp)
goto not_focused;
- /* If we're in a mode, we're not focused. */
- if (wp->screen != &wp->base)
- goto not_focused;
-
/*
* If our window is the current window in any focused clients with an
* attached session, we're focused.
@@ -1660,8 +1656,6 @@ server_client_reset_state(struct client *c)
s = wp->screen;
if (s != NULL)
mode = s->mode;
- if (c->prompt_string != NULL || c->message_string != NULL)
- mode &= ~MODE_CURSOR;
log_debug("%s: client %s mode %x", __func__, c->name, mode);
/* Reset region and margin. */
@@ -1693,8 +1687,8 @@ server_client_reset_state(struct client *c)
* mode.
*/
if (options_get_number(oo, "mouse")) {
- mode &= ~ALL_MOUSE_MODES;
if (c->overlay_draw == NULL) {
+ mode &= ~ALL_MOUSE_MODES;
TAILQ_FOREACH(loop, &w->panes, entry) {
if (loop->screen->mode & MODE_MOUSE_ALL)
mode |= MODE_MOUSE_ALL;
@@ -1985,6 +1979,7 @@ server_client_dispatch(struct imsg *imsg, void *arg)
switch (imsg->hdr.type) {
case MSG_IDENTIFY_FEATURES:
case MSG_IDENTIFY_FLAGS:
+ case MSG_IDENTIFY_LONGFLAGS:
case MSG_IDENTIFY_TERM:
case MSG_IDENTIFY_TTYNAME:
case MSG_IDENTIFY_CWD:
@@ -2028,7 +2023,7 @@ server_client_dispatch(struct imsg *imsg, void *arg)
break;
c->flags &= ~CLIENT_SUSPENDED;
- if (c->fd == -1) /* exited in the meantime */
+ if (c->fd == -1 || c->session == NULL) /* exited already */
break;
s = c->session;
@@ -2143,6 +2138,7 @@ server_client_dispatch_identify(struct client *c, struct imsg *imsg)
const char *data, *home;
size_t datalen;
int flags, feat;
+ uint64_t longflags;
char *name;
if (c->flags & CLIENT_IDENTIFIED)
@@ -2167,6 +2163,14 @@ server_client_dispatch_identify(struct client *c, struct imsg *imsg)
c->flags |= flags;
log_debug("client %p IDENTIFY_FLAGS %#x", c, flags);
break;
+ case MSG_IDENTIFY_LONGFLAGS:
+ if (datalen != sizeof longflags)
+ fatalx("bad MSG_IDENTIFY_LONGFLAGS size");
+ memcpy(&longflags, data, sizeof longflags);
+ c->flags |= longflags;
+ log_debug("client %p IDENTIFY_LONGFLAGS %#llx", c,
+ (unsigned long long)longflags);
+ break;
case MSG_IDENTIFY_TERM:
if (datalen == 0 || data[datalen - 1] != '\0')
fatalx("bad MSG_IDENTIFY_TERM string");