diff options
-rw-r--r-- | sway/commands/move.c | 1 | ||||
-rw-r--r-- | sway/commands/scratchpad.c | 4 | ||||
-rw-r--r-- | sway/tree/root.c | 7 |
3 files changed, 5 insertions, 7 deletions
diff --git a/sway/commands/move.c b/sway/commands/move.c index b22bb056..acb5f44f 100644 --- a/sway/commands/move.c +++ b/sway/commands/move.c | |||
@@ -515,6 +515,7 @@ static struct cmd_results *cmd_move_container(int argc, char **argv) { | |||
515 | // move container | 515 | // move container |
516 | if (container->scratchpad) { | 516 | if (container->scratchpad) { |
517 | root_scratchpad_remove_container(container); | 517 | root_scratchpad_remove_container(container); |
518 | root_scratchpad_show(container); | ||
518 | } | 519 | } |
519 | switch (destination->type) { | 520 | switch (destination->type) { |
520 | case N_WORKSPACE: | 521 | case N_WORKSPACE: |
diff --git a/sway/commands/scratchpad.c b/sway/commands/scratchpad.c index 805dbc0b..714efa2b 100644 --- a/sway/commands/scratchpad.c +++ b/sway/commands/scratchpad.c | |||
@@ -3,6 +3,7 @@ | |||
3 | #include "sway/config.h" | 3 | #include "sway/config.h" |
4 | #include "sway/input/input-manager.h" | 4 | #include "sway/input/input-manager.h" |
5 | #include "sway/input/seat.h" | 5 | #include "sway/input/seat.h" |
6 | #include "sway/ipc-server.h" | ||
6 | #include "sway/tree/container.h" | 7 | #include "sway/tree/container.h" |
7 | #include "sway/tree/root.h" | 8 | #include "sway/tree/root.h" |
8 | #include "sway/tree/workspace.h" | 9 | #include "sway/tree/workspace.h" |
@@ -51,6 +52,7 @@ static void scratchpad_toggle_auto(void) { | |||
51 | "Moving a visible scratchpad window (%s) to this workspace", | 52 | "Moving a visible scratchpad window (%s) to this workspace", |
52 | con->title); | 53 | con->title); |
53 | root_scratchpad_show(con); | 54 | root_scratchpad_show(con); |
55 | ipc_event_window(con, "move"); | ||
54 | return; | 56 | return; |
55 | } | 57 | } |
56 | } | 58 | } |
@@ -62,6 +64,7 @@ static void scratchpad_toggle_auto(void) { | |||
62 | struct sway_container *con = root->scratchpad->items[0]; | 64 | struct sway_container *con = root->scratchpad->items[0]; |
63 | sway_log(SWAY_DEBUG, "Showing %s from list", con->title); | 65 | sway_log(SWAY_DEBUG, "Showing %s from list", con->title); |
64 | root_scratchpad_show(con); | 66 | root_scratchpad_show(con); |
67 | ipc_event_window(con, "move"); | ||
65 | } | 68 | } |
66 | 69 | ||
67 | static void scratchpad_toggle_container(struct sway_container *con) { | 70 | static void scratchpad_toggle_container(struct sway_container *con) { |
@@ -76,6 +79,7 @@ static void scratchpad_toggle_container(struct sway_container *con) { | |||
76 | } | 79 | } |
77 | 80 | ||
78 | root_scratchpad_show(con); | 81 | root_scratchpad_show(con); |
82 | ipc_event_window(con, "move"); | ||
79 | } | 83 | } |
80 | 84 | ||
81 | struct cmd_results *cmd_scratchpad(int argc, char **argv) { | 85 | struct cmd_results *cmd_scratchpad(int argc, char **argv) { |
diff --git a/sway/tree/root.c b/sway/tree/root.c index ec6bccf6..c4d1145d 100644 --- a/sway/tree/root.c +++ b/sway/tree/root.c | |||
@@ -85,9 +85,6 @@ void root_scratchpad_remove_container(struct sway_container *con) { | |||
85 | if (!sway_assert(con->scratchpad, "Container is not in scratchpad")) { | 85 | if (!sway_assert(con->scratchpad, "Container is not in scratchpad")) { |
86 | return; | 86 | return; |
87 | } | 87 | } |
88 | if (!con->workspace) { | ||
89 | root_scratchpad_show(con); | ||
90 | } | ||
91 | con->scratchpad = false; | 88 | con->scratchpad = false; |
92 | int index = list_find(root->scratchpad, con); | 89 | int index = list_find(root->scratchpad, con); |
93 | if (index != -1) { | 90 | if (index != -1) { |
@@ -133,10 +130,6 @@ void root_scratchpad_show(struct sway_container *con) { | |||
133 | 130 | ||
134 | arrange_workspace(new_ws); | 131 | arrange_workspace(new_ws); |
135 | seat_set_focus(seat, seat_get_focus_inactive(seat, &con->node)); | 132 | seat_set_focus(seat, seat_get_focus_inactive(seat, &con->node)); |
136 | |||
137 | if (new_ws != old_ws) { | ||
138 | ipc_event_window(con, "move"); | ||
139 | } | ||
140 | } | 133 | } |
141 | 134 | ||
142 | void root_scratchpad_hide(struct sway_container *con) { | 135 | void root_scratchpad_hide(struct sway_container *con) { |