aboutsummaryrefslogtreecommitdiff
path: root/sway/commands/sticky.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands/sticky.c')
-rw-r--r--sway/commands/sticky.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sway/commands/sticky.c b/sway/commands/sticky.c
index a0dd7215..8692e08d 100644
--- a/sway/commands/sticky.c
+++ b/sway/commands/sticky.c
@@ -6,8 +6,8 @@
#include "sway/output.h"
#include "sway/tree/arrange.h"
#include "sway/tree/container.h"
-#include "sway/tree/layout.h"
#include "sway/tree/view.h"
+#include "sway/tree/workspace.h"
#include "list.h"
struct cmd_results *cmd_sticky(int argc, char **argv) {
@@ -44,7 +44,9 @@ struct cmd_results *cmd_sticky(int argc, char **argv) {
struct sway_container *focused_workspace = container_parent(focus, C_WORKSPACE);
struct sway_container *current_workspace = container_parent(container, C_WORKSPACE);
if (current_workspace != focused_workspace) {
- container_move_to(container, focused_workspace);
+ container_remove_child(container);
+ workspace_add_floating(focused_workspace, container);
+ container_handle_fullscreen_reparent(container, current_workspace);
arrange_windows(focused_workspace);
if (!container_reap_empty(current_workspace)) {
arrange_windows(current_workspace);