aboutsummaryrefslogtreecommitdiff
path: root/sway/commands/floating.c
diff options
context:
space:
mode:
authorAshkan Kiani <ashkan.k.kiani@gmail.com>2019-03-26 20:32:50 -0700
committerBrian Ashworth <bosrsf04@gmail.com>2019-03-26 23:38:23 -0400
commit3a31889d7cb00c28724bc093653b3015393c5cb4 (patch)
tree5d6e3cda7a29ac0804f3d76a38d1c26a9b8cd695 /sway/commands/floating.c
parente9d096468a3fe9d8346dd97a67e050938f0befde (diff)
Fix crash for floating command on scratchpad window
Diffstat (limited to 'sway/commands/floating.c')
-rw-r--r--sway/commands/floating.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sway/commands/floating.c b/sway/commands/floating.c
index 82109369..5df9b1bf 100644
--- a/sway/commands/floating.c
+++ b/sway/commands/floating.c
@@ -45,7 +45,10 @@ struct cmd_results *cmd_floating(int argc, char **argv) {
container_set_floating(container, wants_floating);
- arrange_workspace(container->workspace);
+ // Floating containers in the scratchpad should be ignored
+ if (container->workspace) {
+ arrange_workspace(container->workspace);
+ }
return cmd_results_new(CMD_SUCCESS, NULL);
}