summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/input.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2015-08-29 08:30:54 +0000
committernicm <nicm@openbsd.org>2015-08-29 08:30:54 +0000
commit81fe4598aea414de407c9083a5bba3b397e0bec2 (patch)
tree9700c5afd0116b30b0f79da02f9d64618dd88151 /usr.bin/tmux/input.c
parentAdd Symbols.map to CLEANFILES (diff)
downloadwireguard-openbsd-81fe4598aea414de407c9083a5bba3b397e0bec2.tar.xz
wireguard-openbsd-81fe4598aea414de407c9083a5bba3b397e0bec2.zip
Move alerts onto events rather than checking every loop.
Diffstat (limited to 'usr.bin/tmux/input.c')
-rw-r--r--usr.bin/tmux/input.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/usr.bin/tmux/input.c b/usr.bin/tmux/input.c
index 5d8fa7f2f2d..979cee00325 100644
--- a/usr.bin/tmux/input.c
+++ b/usr.bin/tmux/input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: input.c,v 1.82 2015/08/28 07:49:24 nicm Exp $ */
+/* $OpenBSD: input.c,v 1.83 2015/08/29 08:30:54 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -844,14 +844,9 @@ input_parse(struct window_pane *wp)
if (EVBUFFER_LENGTH(evb) == 0)
return;
+ window_update_activity(wp->window);
wp->flags |= PANE_CHANGED;
- wp->window->flags |= WINDOW_ACTIVITY;
- wp->window->flags &= ~WINDOW_SILENCE;
-
- if (gettimeofday(&wp->window->activity_time, NULL) != 0)
- fatal("gettimeofday failed");
-
/*
* Open the screen. Use NULL wp if there is a mode set as don't want to
* update the tty.
@@ -1081,7 +1076,7 @@ input_c0_dispatch(struct input_ctx *ictx)
case '\000': /* NUL */
break;
case '\007': /* BEL */
- wp->window->flags |= WINDOW_BELL;
+ alerts_queue(wp->window, WINDOW_BELL);
break;
case '\010': /* BS */
screen_write_backspace(sctx);