Bugfix: Correctly initialize workspaces when initializing > 1 workspace (Thanks Mirko)

This commit is contained in:
Michael Stapelberg 2009-09-29 22:25:08 +02:00
parent 2b70e05ee9
commit c4df9f1d95

View File

@ -34,7 +34,7 @@
* *
*/ */
Workspace *workspace_get(int number) { Workspace *workspace_get(int number) {
Workspace *ws; Workspace *ws = NULL;
TAILQ_FOREACH(ws, workspaces, workspaces) TAILQ_FOREACH(ws, workspaces, workspaces)
if (ws->num == number) if (ws->num == number)
return ws; return ws;
@ -48,7 +48,7 @@ Workspace *workspace_get(int number) {
LOG("Creating new ws\n"); LOG("Creating new ws\n");
ws = scalloc(sizeof(Workspace)); ws = scalloc(sizeof(Workspace));
ws->num = number; ws->num = c+1;
TAILQ_INIT(&(ws->floating_clients)); TAILQ_INIT(&(ws->floating_clients));
expand_table_cols(ws); expand_table_cols(ws);
expand_table_rows(ws); expand_table_rows(ws);