summaryrefslogtreecommitdiffstats
path: root/server.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2007-10-12 11:24:15 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2007-10-12 11:24:15 +0000
commitad4a7423c039513bd55d336c9335013d5328811b (patch)
treee820af0c5cc36dc28b57a7b20b6007abd24a4bea /server.c
parentd1589381782732386e07709956f4d6c7ed029d7b (diff)
Mark windows in yellow on status line when bell.
Diffstat (limited to 'server.c')
-rw-r--r--server.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/server.c b/server.c
index e4b63500..edaa07f3 100644
--- a/server.c
+++ b/server.c
@@ -1,4 +1,4 @@
-/* $Id: server.c,v 1.26 2007-10-04 21:21:48 nicm Exp $ */
+/* $Id: server.c,v 1.27 2007-10-12 11:24:15 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -322,10 +322,9 @@ server_lost_client(struct client *c)
void
server_handle_window(struct window *w)
{
- struct client *c;
- struct session *s;
struct buffer *b;
- u_int i, j;
+ struct session *s;
+ u_int i;
b = buffer_create(BUFSIZ);
window_data(w, b);
@@ -338,17 +337,13 @@ server_handle_window(struct window *w)
for (i = 0; i < ARRAY_LENGTH(&sessions); i++) {
s = ARRAY_ITEM(&sessions, i);
- if (s == NULL || !session_has(s, w))
- continue;
-
- for (j = 0; j < ARRAY_LENGTH(&clients); j++) {
- c = ARRAY_ITEM(&clients, j);
- if (c == NULL || c->session != s)
- continue;
- server_write_client(c, MSG_DATA, "\007", 1);
- }
+ if (s != NULL)
+ session_addbell(s, w);
}
-
+
+ server_write_window(w, MSG_DATA, "\007", 1);
+ server_status_window(w);
+
w->flags &= ~WINDOW_BELL;
}