From 19812b2d29e305927461c26651a3d228c22d928a Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 6 Aug 2021 09:19:02 +0000 Subject: Add client focus hooks. --- tty-keys.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tty-keys.c') 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) { -- cgit