From: Michael Stapelberg Date: Tue, 29 Sep 2009 20:25:08 +0000 (+0200) Subject: Bugfix: Correctly initialize workspaces when initializing > 1 workspace (Thanks Mirko) X-Git-Tag: 3.d~57 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c4df9f1d954e28c3a205b04e9269f06aac62efaf;p=i3%2Fi3 Bugfix: Correctly initialize workspaces when initializing > 1 workspace (Thanks Mirko) --- 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);