1
1
mirror of https://github.com/swaywm/sway synced 2024-11-18 19:03:59 +01:00

Prevent changing layout when focusing float window

The layout command should only work with titled windows, thus it should
have no effect when a floating window has focus.

Should fix #643
This commit is contained in:
Mikkel Oscar Lyderik 2016-05-09 15:50:09 +02:00
parent 64db549c18
commit c80ad015ff

@ -1831,6 +1831,10 @@ static struct cmd_results *cmd_layout(int argc, char **argv) {
return error;
}
swayc_t *parent = get_focused_container(&root_container);
if (parent->is_floating) {
return cmd_results_new(CMD_FAILURE, "layout", "Unable to change layout of floating windows");
}
while (parent->type == C_VIEW) {
parent = parent->parent;
}