summaryrefslogtreecommitdiffstats
path: root/cmd-unlink-window.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2009-09-20 22:15:32 +0000
committerTiago Cunha <tcunha@gmx.com>2009-09-20 22:15:32 +0000
commit7335ef5792791e803b090fb9d54718604a0d7dab (patch)
tree5e3d96dc3abf3cac92ea27120266aa3806947333 /cmd-unlink-window.c
parent3266fb5441e99c809ee56806a0eb8d113a4d099f (diff)
Sync OpenBSD patchset 333:
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.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/cmd-unlink-window.c b/cmd-unlink-window.c
index 8903cb6c..ce3fa430 100644
--- a/cmd-unlink-window.c
+++ b/cmd-unlink-window.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-unlink-window.c,v 1.16 2009-07-28 22:12:16 tcunha Exp $ */
+/* $Id: cmd-unlink-window.c,v 1.17 2009-09-20 22:15:32 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -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);