Bugfix: 'level up' needs to stop at the workspace con + testcase (Thanks mseed)

This commit is contained in:
Michael Stapelberg
2011-03-03 14:30:13 +01:00
parent 62362a464d
commit a038d2674b
2 changed files with 24 additions and 2 deletions

View File

@ -268,8 +268,9 @@ void tree_split(Con *con, orientation_t orientation) {
*/
void level_up() {
/* We can focus up to the workspace, but not any higher in the tree */
if (focused->parent->type != CT_CON &&
focused->parent->type != CT_WORKSPACE) {
if ((focused->parent->type != CT_CON &&
focused->parent->type != CT_WORKSPACE) ||
focused->type == CT_WORKSPACE) {
printf("cannot go up\n");
return;
}