Changing to stacking/tabbing toggles mode to default if already in stacking/tiling.

This commit is contained in:
Thorsten Töpper 2010-03-05 23:09:51 +01:00 committed by Michael Stapelberg
parent f1a011c014
commit 4e9c6515f3
1 changed files with 2 additions and 2 deletions

View File

@ -1036,9 +1036,9 @@ void parse_command(xcb_connection_t *conn, const char *command) {
} }
LOG("Switching mode for current container\n"); LOG("Switching mode for current container\n");
int new_mode = MODE_DEFAULT; int new_mode = MODE_DEFAULT;
if (command[0] == 's') if (command[0] == 's' && CUR_CELL->mode != MODE_STACK)
new_mode = MODE_STACK; new_mode = MODE_STACK;
if (command[0] == 'T') if (command[0] == 'T' && CUR_CELL->mode != MODE_TABBED)
new_mode = MODE_TABBED; new_mode = MODE_TABBED;
switch_layout_mode(conn, CUR_CELL, new_mode); switch_layout_mode(conn, CUR_CELL, new_mode);
return; return;