- if (ws != NULL) {
- if (strcmp(window_mode, "mode_toggle") == 0) {
- if (con_inside_floating(focused))
- window_mode = "tiling";
- else
- window_mode = "floating";
- }
- Con *current;
- TAILQ_FOREACH(current, &(ws->focus_head), focused) {
- if ((strcmp(window_mode, "floating") == 0 && current->type != CT_FLOATING_CON) ||
- (strcmp(window_mode, "tiling") == 0 && current->type == CT_FLOATING_CON))
- continue;
+ Con *current;
+ bool success = false;
+ TAILQ_FOREACH(current, &(ws->focus_head), focused) {
+ if ((to_floating && current->type != CT_FLOATING_CON) ||
+ (!to_floating && current->type == CT_FLOATING_CON))
+ continue;