summaryrefslogtreecommitdiffstats
path: root/server-msg.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2007-10-02 17:45:05 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2007-10-02 17:45:05 +0000
commita6d3594d395a61cfab97a69ebcf85bff71875f2f (patch)
treee716b27ff74d518e85e40e64d7581f6aaa10ea82 /server-msg.c
parent1c4ec6e47e0f805e8da61bb6e14f14d301175a93 (diff)
Redraw client status lines on rename.
Diffstat (limited to 'server-msg.c')
-rw-r--r--server-msg.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/server-msg.c b/server-msg.c
index 0ea9299a..1b9cd3fb 100644
--- a/server-msg.c
+++ b/server-msg.c
@@ -1,4 +1,4 @@
-/* $Id: server-msg.c,v 1.13 2007-10-01 14:53:29 nicm Exp $ */
+/* $Id: server-msg.c,v 1.14 2007-10-02 17:45:05 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -401,6 +401,7 @@ server_msg_fn_rename(struct hdr *hdr, struct client *c)
char *cause;
struct window *w;
struct session *s;
+ u_int i;
if (hdr->size != sizeof data)
fatalx("bad MSG_RENAME size");
@@ -429,6 +430,14 @@ server_msg_fn_rename(struct hdr *hdr, struct client *c)
strlcpy(w->name, data.newname, sizeof w->name);
server_write_client(c, MSG_DONE, NULL, 0);
+ for (i = 0; i < ARRAY_LENGTH(&clients); i++) {
+ c = ARRAY_ITEM(&clients, i);
+ if (c != NULL && c->session != NULL) {
+ if (session_has(c->session, w))
+ server_draw_status(c);
+ }
+ }
+
return (0);
}