diff options
author | Mikkel Oscar Lyderik <mikkeloscar@gmail.com> | 2016-05-09 15:50:09 +0200 |
---|---|---|
committer | Mikkel Oscar Lyderik <mikkeloscar@gmail.com> | 2016-05-09 15:55:06 +0200 |
commit | c80ad015ffa2875276ba6bb34004245f91dc5a0f (patch) | |
tree | caf0a66e51fddadc5a1346766d04740cc064c204 | |
parent | Merge pull request #648 from Hummer12007/relative_wallpaper (diff) | |
download | sway-c80ad015ffa2875276ba6bb34004245f91dc5a0f.tar.gz sway-c80ad015ffa2875276ba6bb34004245f91dc5a0f.tar.zst sway-c80ad015ffa2875276ba6bb34004245f91dc5a0f.zip |
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
-rw-r--r-- | sway/commands.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sway/commands.c b/sway/commands.c index 83f09788..22621453 100644 --- a/sway/commands.c +++ b/sway/commands.c | |||
@@ -1831,6 +1831,10 @@ static struct cmd_results *cmd_layout(int argc, char **argv) { | |||
1831 | return error; | 1831 | return error; |
1832 | } | 1832 | } |
1833 | swayc_t *parent = get_focused_container(&root_container); | 1833 | swayc_t *parent = get_focused_container(&root_container); |
1834 | if (parent->is_floating) { | ||
1835 | return cmd_results_new(CMD_FAILURE, "layout", "Unable to change layout of floating windows"); | ||
1836 | } | ||
1837 | |||
1834 | while (parent->type == C_VIEW) { | 1838 | while (parent->type == C_VIEW) { |
1835 | parent = parent->parent; | 1839 | parent = parent->parent; |
1836 | } | 1840 | } |