]> git.sur5r.net Git - i3/i3/commitdiff
Changing to stacking/tabbing toggles mode to default if already in stacking/tiling.
authorThorsten Töpper <atsutane@freethoughts.de>
Fri, 5 Mar 2010 22:09:51 +0000 (23:09 +0100)
committerMichael Stapelberg <michael@stapelberg.de>
Fri, 5 Mar 2010 22:25:34 +0000 (23:25 +0100)
src/commands.c

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