enumerate workspaces when initializing outputs

This commit is contained in:
Michael Stapelberg 2010-11-12 17:33:59 +01:00
parent 5c2758af26
commit c1d574f84e
1 changed files with 3 additions and 1 deletions

View File

@ -59,6 +59,7 @@ void tree_init() {
croot->type = CT_ROOT; croot->type = CT_ROOT;
Con *ws; Con *ws;
int c = 1;
/* add the outputs */ /* add the outputs */
TAILQ_FOREACH(output, &outputs, outputs) { TAILQ_FOREACH(output, &outputs, outputs) {
if (!output->active) if (!output->active)
@ -72,7 +73,8 @@ void tree_init() {
/* add a workspace to this output */ /* add a workspace to this output */
ws = con_new(oc); ws = con_new(oc);
ws->type = CT_WORKSPACE; ws->type = CT_WORKSPACE;
ws->name = strdup("1"); asprintf(&(ws->name), "%d", c);
c++;
ws->fullscreen_mode = CF_OUTPUT; ws->fullscreen_mode = CF_OUTPUT;
ws->orientation = HORIZ; ws->orientation = HORIZ;
} }