diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-10-12 11:24:15 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-10-12 11:24:15 +0000 |
commit | ad4a7423c039513bd55d336c9335013d5328811b (patch) | |
tree | e820af0c5cc36dc28b57a7b20b6007abd24a4bea /server-fn.c | |
parent | d1589381782732386e07709956f4d6c7ed029d7b (diff) |
Mark windows in yellow on status line when bell.
Diffstat (limited to 'server-fn.c')
-rw-r--r-- | server-fn.c | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/server-fn.c b/server-fn.c index 0e8f6242..58a35b15 100644 --- a/server-fn.c +++ b/server-fn.c @@ -1,4 +1,4 @@ -/* $Id: server-fn.c,v 1.19 2007-10-04 19:22:26 nicm Exp $ */ +/* $Id: server-fn.c,v 1.20 2007-10-12 11:24:15 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -123,7 +123,7 @@ server_write_window( } void -server_redraw_status(struct client *c) +server_status_client(struct client *c) { struct hdr hdr; size_t size; @@ -192,7 +192,7 @@ server_redraw_client(struct client *c) } else buffer_reverse_add(c->out, sizeof hdr); - server_redraw_status(c); + server_status_client(c); } void @@ -209,6 +209,19 @@ server_redraw_session(struct session *s) } void +server_status_session(struct session *s) +{ + struct client *c; + u_int i; + + for (i = 0; i < ARRAY_LENGTH(&clients); i++) { + c = ARRAY_ITEM(&clients, i); + if (c != NULL && c->session == s) + server_status_client(c); + } +} + +void server_clear_window(struct window *w) { struct client *c; @@ -235,6 +248,21 @@ server_redraw_window(struct window *w) } void +server_status_window(struct window *w) +{ + struct client *c; + u_int i; + + for (i = 0; i < ARRAY_LENGTH(&clients); i++) { + c = ARRAY_ITEM(&clients, i); + if (c == NULL || c->session == NULL) + continue; + if (session_has(c->session, w)) + server_status_client(c); + } +} + +void server_write_message(struct client *c, const char *fmt, ...) { struct hdr hdr; |