mirror of
https://github.com/swaywm/sway.git
synced 2026-04-01 07:16:02 -04:00
Replace is_floating boolean with function
This commit is contained in:
parent
34f35f0bad
commit
aaba7642b3
12 changed files with 44 additions and 36 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue