enumerate workspaces when initializing outputs

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