summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2020-05-22 15:43:38 +0000
committernicm <nicm@openbsd.org>2020-05-22 15:43:38 +0000
commitf540a43be8cd5402bedc1104928843cc18703f3b (patch)
tree87f7b931b88afd17f46465fcd204481ede4d73f5
parentPanic on unhandled traps (which for now is all of them). (diff)
downloadwireguard-openbsd-f540a43be8cd5402bedc1104928843cc18703f3b.tar.xz
wireguard-openbsd-f540a43be8cd5402bedc1104928843cc18703f3b.zip
FocusIn keys can also update the latest client, like normal keys.
-rw-r--r--usr.bin/tmux/server-client.c4
-rw-r--r--usr.bin/tmux/tty-keys.c9
2 files changed, 5 insertions, 8 deletions
diff --git a/usr.bin/tmux/server-client.c b/usr.bin/tmux/server-client.c
index 44bc6ed6792..1c1a45f09ee 100644
--- a/usr.bin/tmux/server-client.c
+++ b/usr.bin/tmux/server-client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server-client.c,v 1.346 2020/05/22 11:07:04 nicm Exp $ */
+/* $OpenBSD: server-client.c,v 1.347 2020/05/22 15:43:38 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -1286,7 +1286,7 @@ forward_key:
window_pane_key(wp, c, s, wl, key, m);
out:
- if (s != NULL)
+ if (s != NULL && key != KEYC_FOCUS_OUT)
server_client_update_latest(c);
free(event);
return (CMD_RETURN_NORMAL);
diff --git a/usr.bin/tmux/tty-keys.c b/usr.bin/tmux/tty-keys.c
index 80b59c0d720..ddcde5efbbe 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.136 2020/05/16 16:44:54 nicm Exp $ */
+/* $OpenBSD: tty-keys.c,v 1.137 2020/05/22 15:43:38 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -800,13 +800,10 @@ complete_key:
tty->flags &= ~TTY_TIMER;
/* Check for focus events. */
- if (key == KEYC_FOCUS_OUT) {
+ if (key == KEYC_FOCUS_OUT)
tty->client->flags &= ~CLIENT_FOCUSED;
- return (1);
- } else if (key == KEYC_FOCUS_IN) {
+ else if (key == KEYC_FOCUS_IN)
tty->client->flags |= CLIENT_FOCUSED;
- return (1);
- }
/* Fire the key. */
if (key != KEYC_UNKNOWN) {