refactor workspace_show and friends

This commit is contained in:
Noe Rubinstein
2011-10-02 17:54:23 +02:00
committed by Michael Stapelberg
parent 29fb09ae74
commit 92cc4494aa
6 changed files with 37 additions and 29 deletions

View File

@ -440,7 +440,7 @@ focus:
int count = 0;
TAILQ_FOREACH(current, &owindows, owindows) {
Con *ws = con_get_workspace(current->con);
workspace_show(ws->name);
workspace_show(ws);
LOG("focusing %p / %s\n", current->con, current->con->name);
con_focus(current->con);
count++;
@ -561,18 +561,18 @@ optional_kill_mode:
workspace:
TOK_WORKSPACE TOK_NEXT
{
workspace_next();
workspace_show(workspace_next());
tree_render();
}
| TOK_WORKSPACE TOK_PREV
{
workspace_prev();
workspace_show(workspace_prev());
tree_render();
}
| TOK_WORKSPACE STR
{
printf("should switch to workspace %s\n", $2);
workspace_show($2);
workspace_show_by_name($2);
free($2);
tree_render();