diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-09-29 09:15:49 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-09-29 09:15:49 +0000 |
commit | 0bbe838b259f0a4d8a407a63e602f9b38a287c98 (patch) | |
tree | 4545d43d3ab90607d79c7aedf504cbf7150cbb70 /window.c | |
parent | feff317fbd1a77067d2dee824c4c3a1c0fb64b81 (diff) | |
download | rtmux-0bbe838b259f0a4d8a407a63e602f9b38a287c98.tar.gz rtmux-0bbe838b259f0a4d8a407a63e602f9b38a287c98.tar.bz2 rtmux-0bbe838b259f0a4d8a407a63e602f9b38a287c98.zip |
Window flags, currently only bell.
Diffstat (limited to 'window.c')
-rw-r--r-- | window.c | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -1,4 +1,4 @@ -/* $Id: window.c,v 1.12 2007-09-28 22:47:22 nicm Exp $ */ +/* $Id: window.c,v 1.13 2007-09-29 09:15:49 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -314,9 +314,12 @@ window_input(struct window *w, struct buffer *b, size_t size) void window_output(struct window *w, struct buffer *b) { - size_t used; + if (BUFFER_USED(w->in) == 0) + return; - used = input_parse(&w->ictx, BUFFER_OUT(w->in), BUFFER_USED(w->in), b); - if (used != 0) - buffer_remove(w->in, used); + input_parse(&w->ictx, BUFFER_OUT(w->in), BUFFER_USED(w->in), b); + buffer_remove(w->in, BUFFER_USED(w->in)); + + if (INPUT_FLAGS(&w->ictx) & INPUT_BELL) + w->flags |= WINDOW_BELL; } |