From c4df9f1d954e28c3a205b04e9269f06aac62efaf Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Tue, 29 Sep 2009 22:25:08 +0200 Subject: [PATCH] Bugfix: Correctly initialize workspaces when initializing > 1 workspace (Thanks Mirko) --- src/workspace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/workspace.c b/src/workspace.c index 8f0b42d7..c5e9ecdb 100644 --- a/src/workspace.c +++ b/src/workspace.c @@ -34,7 +34,7 @@ * */ Workspace *workspace_get(int number) { - Workspace *ws; + Workspace *ws = NULL; TAILQ_FOREACH(ws, workspaces, workspaces) if (ws->num == number) return ws; @@ -48,7 +48,7 @@ Workspace *workspace_get(int number) { LOG("Creating new ws\n"); ws = scalloc(sizeof(Workspace)); - ws->num = number; + ws->num = c+1; TAILQ_INIT(&(ws->floating_clients)); expand_table_cols(ws); expand_table_rows(ws);