summaryrefslogtreecommitdiffstats
path: root/tty-keys.c
diff options
context:
space:
mode:
authornicm <nicm>2021-08-06 09:19:02 +0000
committernicm <nicm>2021-08-06 09:19:02 +0000
commit19812b2d29e305927461c26651a3d228c22d928a (patch)
treeb85658024480ddc3c560d077b5e6a73264f1f372 /tty-keys.c
parentef5602a5901774425d455a11f71a49258ed2ead6 (diff)
Add client focus hooks.
Diffstat (limited to 'tty-keys.c')
-rw-r--r--tty-keys.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tty-keys.c b/tty-keys.c
index 3012be3d..02fba0e5 100644
--- a/tty-keys.c
+++ b/tty-keys.c
@@ -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) {