aboutsummaryrefslogtreecommitdiff
path: root/sway/commands
diff options
context:
space:
mode:
authorBrian Ashworth <bosrsf04@gmail.com>2019-01-22 03:47:32 -0500
committeremersion <contact@emersion.fr>2019-01-22 13:13:34 +0100
commit8ce57f0a77f50315c83bae305e78091cc40175c2 (patch)
tree1d279b36e7c3a16defd1e3ec4be2335f0eb0982f /sway/commands
parentde9a357de84da4436b263ff6a969eb4ac753af0d (diff)
downloadsway-8ce57f0a77f50315c83bae305e78091cc40175c2.tar.xz
root_scratchpad_remove_container: do not show
This removes the call to `root_scratchpad_show` from `root_scratchpad_remove_container` and places it in the `cmd_move_container`. This also moved the IPC `window::move` event to `cmd_scratchpad`.
Diffstat (limited to 'sway/commands')
-rw-r--r--sway/commands/move.c1
-rw-r--r--sway/commands/scratchpad.c4
2 files changed, 5 insertions, 0 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) {
// move container
if (container->scratchpad) {
root_scratchpad_remove_container(container);
+ root_scratchpad_show(container);
}
switch (destination->type) {
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 @@
#include "sway/config.h"
#include "sway/input/input-manager.h"
#include "sway/input/seat.h"
+#include "sway/ipc-server.h"
#include "sway/tree/container.h"
#include "sway/tree/root.h"
#include "sway/tree/workspace.h"
@@ -51,6 +52,7 @@ static void scratchpad_toggle_auto(void) {
"Moving a visible scratchpad window (%s) to this workspace",
con->title);
root_scratchpad_show(con);
+ ipc_event_window(con, "move");
return;
}
}
@@ -62,6 +64,7 @@ static void scratchpad_toggle_auto(void) {
struct sway_container *con = root->scratchpad->items[0];
sway_log(SWAY_DEBUG, "Showing %s from list", con->title);
root_scratchpad_show(con);
+ ipc_event_window(con, "move");
}
static void scratchpad_toggle_container(struct sway_container *con) {
@@ -76,6 +79,7 @@ static void scratchpad_toggle_container(struct sway_container *con) {
}
root_scratchpad_show(con);
+ ipc_event_window(con, "move");
}
struct cmd_results *cmd_scratchpad(int argc, char **argv) {