diff options
author | Orestis Floros <orestisflo@gmail.com> | 2023-09-19 22:02:31 +0200 |
---|---|---|
committer | Michael Stapelberg <stapelberg@users.noreply.github.com> | 2023-09-21 18:55:01 +0200 |
commit | 5489db6bc84b402de85643e6e86b18379e67864b (patch) | |
tree | 1ed1b806b2c606be0722385f227412cd0af27120 /src | |
parent | f4959d5da426ec154fe56abeb3a7c78d0d80af81 (diff) | |
download | i3-5489db6bc84b402de85643e6e86b18379e67864b.tar.gz i3-5489db6bc84b402de85643e6e86b18379e67864b.zip |
motif hints: respect maximum border style in append_layout
Diffstat (limited to 'src')
-rw-r--r-- | src/load_layout.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/load_layout.c b/src/load_layout.c index edcd50e9..603b029d 100644 --- a/src/load_layout.c +++ b/src/load_layout.c @@ -351,17 +351,18 @@ static int json_string(void *ctx, const unsigned char *val, size_t len) { } else if (strcasecmp(last_key, "border") == 0) { char *buf = NULL; sasprintf(&buf, "%.*s", (int)len, val); - if (strcasecmp(buf, "none") == 0) - json_node->border_style = BS_NONE; - else if (strcasecmp(buf, "1pixel") == 0) { - json_node->border_style = BS_PIXEL; + if (strcasecmp(buf, "none") == 0) { + json_node->max_user_border_style = json_node->border_style = BS_NONE; + } else if (strcasecmp(buf, "1pixel") == 0) { + json_node->max_user_border_style = json_node->border_style = BS_PIXEL; json_node->current_border_width = 1; - } else if (strcasecmp(buf, "pixel") == 0) - json_node->border_style = BS_PIXEL; - else if (strcasecmp(buf, "normal") == 0) - json_node->border_style = BS_NORMAL; - else + } else if (strcasecmp(buf, "pixel") == 0) { + json_node->max_user_border_style = json_node->border_style = BS_PIXEL; + } else if (strcasecmp(buf, "normal") == 0) { + json_node->max_user_border_style = json_node->border_style = BS_NORMAL; + } else { LOG("Unhandled \"border\": %s\n", buf); + } free(buf); } else if (strcasecmp(last_key, "type") == 0) { char *buf = NULL; |