diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-10-02 17:45:05 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-10-02 17:45:05 +0000 |
commit | a6d3594d395a61cfab97a69ebcf85bff71875f2f (patch) | |
tree | e716b27ff74d518e85e40e64d7581f6aaa10ea82 /server-msg.c | |
parent | 1c4ec6e47e0f805e8da61bb6e14f14d301175a93 (diff) |
Redraw client status lines on rename.
Diffstat (limited to 'server-msg.c')
-rw-r--r-- | server-msg.c | 11 |
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); } |