diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2018-09-11 19:34:57 -0400 |
---|---|---|
committer | Brian Ashworth <bosrsf04@gmail.com> | 2018-09-11 19:34:57 -0400 |
commit | 0b7fe54f9e9fe1a3ac548eaa9fefa2e4058a2493 (patch) | |
tree | 1585405d2bbc26039d92f38cc5c63c36a62926e8 | |
parent | Merge pull request #2618 from RyanDwyer/tiling-drag (diff) | |
download | sway-0b7fe54f9e9fe1a3ac548eaa9fefa2e4058a2493.tar.gz sway-0b7fe54f9e9fe1a3ac548eaa9fefa2e4058a2493.tar.zst sway-0b7fe54f9e9fe1a3ac548eaa9fefa2e4058a2493.zip |
Update textures for cmd_client_* commands
Since the `client.{focused,focused_inactive,unfocused,urgent}` commands
change colors, the textures need to be updated otherwise the textures
and the rest of the title bar may utilize different colors.
-rw-r--r-- | sway/commands/client.c | 17 |
1 files changed, 17 insertions, 0 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 @@ | |||
1 | #include "log.h" | 1 | #include "log.h" |
2 | #include "sway/commands.h" | 2 | #include "sway/commands.h" |
3 | #include "sway/config.h" | 3 | #include "sway/config.h" |
4 | #include "sway/output.h" | ||
4 | #include "sway/tree/container.h" | 5 | #include "sway/tree/container.h" |
5 | 6 | ||
7 | static void rebuild_textures_iterator(struct sway_container *con, void *data) { | ||
8 | if (con->view) { | ||
9 | view_update_marks_textures(con->view); | ||
10 | } | ||
11 | container_update_title_textures(con); | ||
12 | } | ||
13 | |||
6 | /** | 14 | /** |
7 | * Parse the hex string into an integer. | 15 | * Parse the hex string into an integer. |
8 | */ | 16 | */ |
@@ -79,6 +87,15 @@ static struct cmd_results *handle_command(int argc, char **argv, | |||
79 | "Unable to parse child border color"); | 87 | "Unable to parse child border color"); |
80 | } | 88 | } |
81 | 89 | ||
90 | if (config->active) { | ||
91 | root_for_each_container(rebuild_textures_iterator, NULL); | ||
92 | |||
93 | for (int i = 0; i < root->outputs->length; ++i) { | ||
94 | struct sway_output *output = root->outputs->items[i]; | ||
95 | output_damage_whole(output); | ||
96 | } | ||
97 | } | ||
98 | |||
82 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); | 99 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); |
83 | } | 100 | } |
84 | 101 | ||