diff options
author | Ian Fan <ianfan0@gmail.com> | 2019-01-22 11:07:32 +0000 |
---|---|---|
committer | Ian Fan <ianfan0@gmail.com> | 2019-01-22 11:47:48 +0000 |
commit | 34dea3d9d26a4e50c435a0fc51933fea956743cd (patch) | |
tree | d94059d2246a5d8ea9405a44952c8088dbd924d7 /sway/commands/sticky.c | |
parent | Remove assumption that noop output will be called NOOP-1 (diff) | |
download | sway-34dea3d9d26a4e50c435a0fc51933fea956743cd.tar.gz sway-34dea3d9d26a4e50c435a0fc51933fea956743cd.tar.zst sway-34dea3d9d26a4e50c435a0fc51933fea956743cd.zip |
commands: allow tiled containers to be stickied
This also stops stickied containers from losing its sticky status when
it is tiled, allowing it to be immediately stickied when floated again.
Diffstat (limited to 'sway/commands/sticky.c')
-rw-r--r-- | sway/commands/sticky.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/sway/commands/sticky.c b/sway/commands/sticky.c index 15b726cc..e79af8af 100644 --- a/sway/commands/sticky.c +++ b/sway/commands/sticky.c | |||
@@ -22,14 +22,9 @@ struct cmd_results *cmd_sticky(int argc, char **argv) { | |||
22 | return cmd_results_new(CMD_FAILURE, "No current container"); | 22 | return cmd_results_new(CMD_FAILURE, "No current container"); |
23 | }; | 23 | }; |
24 | 24 | ||
25 | if (!container_is_floating(container)) { | ||
26 | return cmd_results_new(CMD_FAILURE, | ||
27 | "Can't set sticky on a tiled container"); | ||
28 | } | ||
29 | |||
30 | container->is_sticky = parse_boolean(argv[0], container->is_sticky); | 25 | container->is_sticky = parse_boolean(argv[0], container->is_sticky); |
31 | 26 | ||
32 | if (container->is_sticky && | 27 | if (container->is_sticky && container_is_floating_or_child(container) && |
33 | (!container->scratchpad || container->workspace)) { | 28 | (!container->scratchpad || container->workspace)) { |
34 | // move container to active workspace | 29 | // move container to active workspace |
35 | struct sway_workspace *active_workspace = | 30 | struct sway_workspace *active_workspace = |