summaryrefslogtreecommitdiffstats
path: root/cmd-unlink-window.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-09-20 17:27:18 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-09-20 17:27:18 +0000
commit9b5f5ed8e8f74a9a615dfb6f5975b2f054d6d1fd (patch)
tree9e7eb6387f389f1f26165b67f027d2bf347906e4 /cmd-unlink-window.c
parent273f1b385cdbe472501092edabf78acb2ea70a47 (diff)
Move some common and untidy code for window link/unlink into generic functions
instead of duplicating it in move/link window..
Diffstat (limited to 'cmd-unlink-window.c')
-rw-r--r--cmd-unlink-window.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/cmd-unlink-window.c b/cmd-unlink-window.c
index fd72b252..5c9f811b 100644
--- a/cmd-unlink-window.c
+++ b/cmd-unlink-window.c
@@ -55,17 +55,7 @@ cmd_unlink_window_exec(struct cmd *self, struct cmd_ctx *ctx)
return (-1);
}
- destroyed = session_detach(s, wl);
- for (i = 0; i < ARRAY_LENGTH(&clients); i++) {
- c = ARRAY_ITEM(&clients, i);
- if (c == NULL || c->session != s)
- continue;
- if (destroyed) {
- c->session = NULL;
- server_write_client(c, MSG_EXIT, NULL, 0);
- } else
- server_redraw_client(c);
- }
+ server_unlink_window(s, wl);
recalculate_sizes();
return (0);