aboutsummaryrefslogtreecommitdiff
path: root/sway/commands
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands')
-rw-r--r--sway/commands/floating.c2
-rw-r--r--sway/commands/layout.c10
-rw-r--r--sway/commands/sticky.c2
3 files changed, 5 insertions, 9 deletions
diff --git a/sway/commands/floating.c b/sway/commands/floating.c
index 38a4e1da..46b761da 100644
--- a/sway/commands/floating.c
+++ b/sway/commands/floating.c
@@ -28,7 +28,7 @@ struct cmd_results *cmd_floating(int argc, char **argv) {
} else if (strcasecmp(argv[0], "disable") == 0) {
wants_floating = false;
} else if (strcasecmp(argv[0], "toggle") == 0) {
- wants_floating = !container->is_floating;
+ wants_floating = !container_is_floating(container);
} else {
return cmd_results_new(CMD_FAILURE, "floating",
"Expected 'floating <enable|disable|toggle>'");
diff --git a/sway/commands/layout.c b/sway/commands/layout.c
index 6b44b001..a009e38f 100644
--- a/sway/commands/layout.c
+++ b/sway/commands/layout.c
@@ -12,19 +12,15 @@ struct cmd_results *cmd_layout(int argc, char **argv) {
}
struct sway_container *parent = config->handler_context.current_container;
- // TODO: floating
- /*
- if (parent->is_floating) {
- return cmd_results_new(CMD_FAILURE, "layout", "Unable to change layout of floating windows");
+ if (container_is_floating(parent)) {
+ return cmd_results_new(CMD_FAILURE, "layout",
+ "Unable to change layout of floating windows");
}
- */
while (parent->type == C_VIEW) {
parent = parent->parent;
}
- // TODO: stacks and tabs
-
if (strcasecmp(argv[0], "default") == 0) {
parent->layout = parent->prev_layout;
if (parent->layout == L_NONE) {
diff --git a/sway/commands/sticky.c b/sway/commands/sticky.c
index 4bb4bd39..732ccb98 100644
--- a/sway/commands/sticky.c
+++ b/sway/commands/sticky.c
@@ -17,7 +17,7 @@ struct cmd_results *cmd_sticky(int argc, char **argv) {
}
struct sway_container *container =
config->handler_context.current_container;
- if (!container->is_floating) {
+ if (!container_is_floating(container)) {
return cmd_results_new(CMD_FAILURE, "sticky",
"Can't set sticky on a tiled container");
}