diff options
author | 2013-06-23 13:10:46 +0000 | |
---|---|---|
committer | 2013-06-23 13:10:46 +0000 | |
commit | af1903b1fc4428e28f26a0e0bc6665326a9fb498 (patch) | |
tree | 1369278130ef47a1022afc0d4ee395f524f673ed /usr.bin/tmux/server-client.c | |
parent | Always push a focus event when the application turns it on, prompted by (diff) | |
download | wireguard-openbsd-af1903b1fc4428e28f26a0e0bc6665326a9fb498.tar.xz wireguard-openbsd-af1903b1fc4428e28f26a0e0bc6665326a9fb498.zip |
Focus events can cause trouble if left on and they can't be turned off
during idle periods (like the other states are) because we'd miss
events. So add a server option to control them. Defaults to off.
Diffstat (limited to 'usr.bin/tmux/server-client.c')
-rw-r--r-- | usr.bin/tmux/server-client.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/tmux/server-client.c b/usr.bin/tmux/server-client.c index 829fd8dbf59..e168dc120fc 100644 --- a/usr.bin/tmux/server-client.c +++ b/usr.bin/tmux/server-client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server-client.c,v 1.102 2013/06/23 12:51:28 nicm Exp $ */ +/* $OpenBSD: server-client.c,v 1.103 2013/06/23 13:10:46 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net> @@ -550,6 +550,10 @@ server_client_check_focus(struct window_pane *wp) struct client *c; int push; + /* Are focus events off? */ + if (!options_get_number(&global_options, "focus-events")) + return; + /* Do we need to push the focus state? */ push = wp->flags & PANE_FOCUSPUSH; wp->flags &= ~PANE_FOCUSPUSH; |