diff options
Diffstat (limited to 'sway/commands')
-rw-r--r-- | sway/commands/client.c | 17 | ||||
-rw-r--r-- | sway/commands/move.c | 2 | ||||
-rw-r--r-- | sway/commands/tiling_drag.c | 13 |
3 files changed, 31 insertions, 1 deletions
diff --git a/sway/commands/client.c b/sway/commands/client.c index d6b7de1a..6e5f08a2 100644 --- a/sway/commands/client.c +++ b/sway/commands/client.c @@ -1,8 +1,16 @@ #include "log.h" #include "sway/commands.h" #include "sway/config.h" +#include "sway/output.h" #include "sway/tree/container.h" +static void rebuild_textures_iterator(struct sway_container *con, void *data) { + if (con->view) { + view_update_marks_textures(con->view); + } + container_update_title_textures(con); +} + /** * Parse the hex string into an integer. */ @@ -79,6 +87,15 @@ static struct cmd_results *handle_command(int argc, char **argv, "Unable to parse child border color"); } + if (config->active) { + root_for_each_container(rebuild_textures_iterator, NULL); + + for (int i = 0; i < root->outputs->length; ++i) { + struct sway_output *output = root->outputs->items[i]; + output_damage_whole(output); + } + } + return cmd_results_new(CMD_SUCCESS, NULL, NULL); } diff --git a/sway/commands/move.c b/sway/commands/move.c index 00bd8acd..cd970983 100644 --- a/sway/commands/move.c +++ b/sway/commands/move.c @@ -236,7 +236,7 @@ static void container_move_to_container(struct sway_container *container, container->saved_width = container->saved_height = 0; if (destination->view) { - container_add_sibling(destination, container); + container_add_sibling(destination, container, 1); } else { container_add_child(destination, container); } diff --git a/sway/commands/tiling_drag.c b/sway/commands/tiling_drag.c new file mode 100644 index 00000000..92fbde7c --- /dev/null +++ b/sway/commands/tiling_drag.c @@ -0,0 +1,13 @@ +#include "sway/commands.h" +#include "util.h" + +struct cmd_results *cmd_tiling_drag(int argc, char **argv) { + struct cmd_results *error = NULL; + if ((error = checkarg(argc, "tiling_drag", EXPECTED_EQUAL_TO, 1))) { + return error; + } + + config->tiling_drag = parse_boolean(argv[0], config->tiling_drag); + + return cmd_results_new(CMD_SUCCESS, NULL, NULL); +} |