Bugfix: Ignore spaces in front of default workspace name

This commit is contained in:
Eika Enge 2013-05-26 18:24:55 +07:00 committed by Michael Stapelberg
parent e53b410894
commit 625d5bdba6
1 changed files with 2 additions and 0 deletions

View File

@ -128,6 +128,8 @@ Con *create_workspace_on_output(Output *output, Con *content) {
continue; continue;
DLOG("relevant command = %s\n", bind->command); DLOG("relevant command = %s\n", bind->command);
char *target = bind->command + strlen("workspace "); char *target = bind->command + strlen("workspace ");
while((*target == ' ' || *target == '\t') && target != '\0')
target++;
/* We check if this is the workspace /* We check if this is the workspace
* next/prev/next_on_output/prev_on_output/back_and_forth/number command. * next/prev/next_on_output/prev_on_output/back_and_forth/number command.
* Beware: The workspace names "next", "prev", "next_on_output", * Beware: The workspace names "next", "prev", "next_on_output",