summaryrefslogtreecommitdiffstats
path: root/tty-keys.c
diff options
context:
space:
mode:
authornicm <nicm>2021-08-13 06:52:51 +0000
committernicm <nicm>2021-08-13 06:52:51 +0000
commit2bb0b9d6c5edd7c4127c971f5ccebed969f86c1c (patch)
treedc1ce41c165065e588de274dd754113bd0cb8a3f /tty-keys.c
parenta2b85069171413aa30c812d44bf8ee4d32a2f834 (diff)
Change focus to be driven by events rather than walking all panes at end
of event loop, this way the ordering of in and out can be enforced. GitHub issue 2808.
Diffstat (limited to 'tty-keys.c')
-rw-r--r--tty-keys.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tty-keys.c b/tty-keys.c
index 02fba0e5..156fceba 100644
--- a/tty-keys.c
+++ b/tty-keys.c
@@ -821,11 +821,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. */