diff options
Diffstat (limited to 'sway/commands/sticky.c')
-rw-r--r-- | sway/commands/sticky.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sway/commands/sticky.c b/sway/commands/sticky.c index e79af8af..5b70199c 100644 --- a/sway/commands/sticky.c +++ b/sway/commands/sticky.c | |||
@@ -17,15 +17,15 @@ struct cmd_results *cmd_sticky(int argc, char **argv) { | |||
17 | return error; | 17 | return error; |
18 | } | 18 | } |
19 | struct sway_container *container = config->handler_context.container; | 19 | struct sway_container *container = config->handler_context.container; |
20 | 20 | ||
21 | if (container == NULL) { | 21 | if (container == NULL) { |
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 | container->is_sticky = parse_boolean(argv[0], container->is_sticky); | 25 | container->is_sticky = parse_boolean(argv[0], container->is_sticky); |
26 | 26 | ||
27 | if (container->is_sticky && container_is_floating_or_child(container) && | 27 | if (container->is_sticky && container_is_floating_or_child(container) && |
28 | (!container->scratchpad || container->workspace)) { | 28 | !container_is_scratchpad_hidden(container)) { |
29 | // move container to active workspace | 29 | // move container to active workspace |
30 | struct sway_workspace *active_workspace = | 30 | struct sway_workspace *active_workspace = |
31 | output_get_active_workspace(container->workspace->output); | 31 | output_get_active_workspace(container->workspace->output); |