diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2021-08-06 09:19:03 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2021-08-06 09:19:03 +0000 |
commit | 482df360af20c90d5e2ba058334cb4358b1fbc63 (patch) | |
tree | 991d21b74138f922b78d38f4780df94bebc0fd39 /usr.bin/tmux/tty-keys.c | |
parent | 4f21b97f24315bb28d0f6974e3d807c7d015045f (diff) |
Add client focus hooks.
Diffstat (limited to 'usr.bin/tmux/tty-keys.c')
-rw-r--r-- | usr.bin/tmux/tty-keys.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.bin/tmux/tty-keys.c b/usr.bin/tmux/tty-keys.c index ed0041e4625..13f47f97746 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.147 2021/06/10 07:21:10 nicm Exp $ */ +/* $OpenBSD: tty-keys.c,v 1.148 2021/08/06 09:19:02 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -820,10 +820,13 @@ 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; - else if (key == KEYC_FOCUS_IN) + notify_client("client-focus-out", c); + } else if (key == KEYC_FOCUS_IN) { tty->client->flags |= CLIENT_FOCUSED; + notify_client("client-focus-in", c); + } /* Fire the key. */ if (key != KEYC_UNKNOWN) { |