summaryrefslogtreecommitdiffstats
path: root/input.c
diff options
context:
space:
mode:
authornicm <nicm>2015-08-29 08:30:54 +0000
committernicm <nicm>2015-08-29 08:30:54 +0000
commitb5aaefc727f303276a681d74f091f52a7e859d36 (patch)
tree0ebc5bf2a6b6897d11759d6ee8afe7d0a3444de0 /input.c
parent5267ce8ff41e8c5e69fa5d05da92b61e739c328a (diff)
Move alerts onto events rather than checking every loop.
Diffstat (limited to 'input.c')
-rw-r--r--input.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/input.c b/input.c
index 7ec35c88..cfe6b4af 100644
--- a/input.c
+++ b/input.c
@@ -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);