summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/tty-keys.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2021-08-13 06:52:52 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2021-08-13 06:52:52 +0000
commited494901095f45650fd129e1f8a6f4c3eceab503 (patch)
tree03fbcabdb314bffc3ffee9e7348f720036e0816c /usr.bin/tmux/tty-keys.c
parenteed9256d707e6d4d197e53024454b58138b4fed8 (diff)
Change focus to be driven by events rather than walking all panes at end
of event loop, this way the ordering of in and out can be enforced. GitHub issue 2808.
Diffstat (limited to 'usr.bin/tmux/tty-keys.c')
-rw-r--r--usr.bin/tmux/tty-keys.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/tmux/tty-keys.c b/usr.bin/tmux/tty-keys.c
index 13f47f97746..e64f9b8e3f8 100644
--- a/usr.bin/tmux/tty-keys.c
+++ b/usr.bin/tmux/tty-keys.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty-keys.c,v 1.148 2021/08/06 09:19:02 nicm Exp $ */
+/* $OpenBSD: tty-keys.c,v 1.149 2021/08/13 06:52:51 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -821,11 +821,13 @@ complete_key:
/* Check for focus events. */
if (key == KEYC_FOCUS_OUT) {
- tty->client->flags &= ~CLIENT_FOCUSED;
+ c->flags &= ~CLIENT_FOCUSED;
+ window_update_focus(c->session->curw->window);
notify_client("client-focus-out", c);
} else if (key == KEYC_FOCUS_IN) {
- tty->client->flags |= CLIENT_FOCUSED;
+ c->flags |= CLIENT_FOCUSED;
notify_client("client-focus-in", c);
+ window_update_focus(c->session->curw->window);
}
/* Fire the key. */