aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Fan <ianfan0@gmail.com>2019-03-11 16:50:52 +0000
committerBrian Ashworth <bosrsf04@gmail.com>2019-03-11 21:49:37 -0400
commit055d662baa3975d71552992772e97d6b489f0771 (patch)
treeec96613c9be46f619b43fd5c71518f433f2f1b42
parent076257a978ce5f93b9b1613e43a067e602b5b041 (diff)
downloadsway-055d662baa3975d71552992772e97d6b489f0771.zip
sway-055d662baa3975d71552992772e97d6b489f0771.tar.gz
sway-055d662baa3975d71552992772e97d6b489f0771.tar.bz2
commands: allow tiled sticky containers to be moved
Namely, to a workspace on the same output. However, tiled sticky children of floating containers are still restricted.
-rw-r--r--sway/commands/move.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sway/commands/move.c b/sway/commands/move.c
index 4306aac..926b2e8 100644
--- a/sway/commands/move.c
+++ b/sway/commands/move.c
@@ -473,7 +473,7 @@ static struct cmd_results *cmd_move_container(int argc, char **argv) {
// We have to create the workspace, but if the container is
// sticky and the workspace is going to be created on the same
// output, we'll bail out first.
- if (container->is_sticky) {
+ if (container->is_sticky && container_is_floating_or_child(container)) {
struct sway_output *new_output =
workspace_get_initial_output(ws_name);
if (old_output == new_output) {
@@ -507,8 +507,8 @@ static struct cmd_results *cmd_move_container(int argc, char **argv) {
return cmd_results_new(CMD_INVALID, expected_syntax);
}
- if (container->is_sticky && old_output &&
- node_has_ancestor(destination, &old_output->node)) {
+ if (container->is_sticky && container_is_floating_or_child(container) &&
+ old_output && node_has_ancestor(destination, &old_output->node)) {
return cmd_results_new(CMD_FAILURE, "Can't move sticky "
"container to another workspace on the same output");
}