summaryrefslogtreecommitdiffstats
path: root/tty-keys.c
diff options
context:
space:
mode:
Diffstat (limited to 'tty-keys.c')
-rw-r--r--tty-keys.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/tty-keys.c b/tty-keys.c
index 02fba0e5..6dfa70f3 100644
--- a/tty-keys.c
+++ b/tty-keys.c
@@ -58,6 +58,17 @@ static int tty_keys_device_attributes(struct tty *, const char *, size_t,
static int tty_keys_extended_device_attributes(struct tty *, const char *,
size_t, size_t *);
+/* A key tree entry. */
+struct tty_key {
+ char ch;
+ key_code key;
+
+ struct tty_key *left;
+ struct tty_key *right;
+
+ struct tty_key *next;
+};
+
/* Default raw keys. */
struct tty_default_key_raw {
const char *string;
@@ -821,11 +832,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. */