Skip to content

Commit

Permalink
Merge pull request #3494 from ianyfan/commands
Browse files Browse the repository at this point in the history
i3 command behaviour compatibility fixes
  • Loading branch information
ddevault committed Jan 22, 2019
2 parents 8ce57f0 + ec0013b commit 71a37ad
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 13 deletions.
7 changes: 1 addition & 6 deletions sway/commands/floating.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,7 @@ struct cmd_results *cmd_floating(int argc, char **argv) {
}
}

if (container->scratchpad && !container->workspace) {
return cmd_results_new(CMD_FAILURE,
"Cannot set floating status on a hidden scratchpad container");
}

bool wants_floating =
bool wants_floating =
parse_boolean(argv[0], container_is_floating(container));

container_set_floating(container, wants_floating);
Expand Down
7 changes: 1 addition & 6 deletions sway/commands/sticky.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,9 @@ struct cmd_results *cmd_sticky(int argc, char **argv) {
return cmd_results_new(CMD_FAILURE, "No current container");
};

if (!container_is_floating(container)) {
return cmd_results_new(CMD_FAILURE,
"Can't set sticky on a tiled container");
}

container->is_sticky = parse_boolean(argv[0], container->is_sticky);

if (container->is_sticky &&
if (container->is_sticky && container_is_floating_or_child(container) &&
(!container->scratchpad || container->workspace)) {
// move container to active workspace
struct sway_workspace *active_workspace =
Expand Down
1 change: 0 additions & 1 deletion sway/tree/container.c
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,6 @@ void container_set_floating(struct sway_container *container, bool enable) {
container->border = container->saved_border;
}
}
container->is_sticky = false;
}

container_end_mouse_operation(container);
Expand Down

0 comments on commit 71a37ad

Please sign in to comment.