diff options
author | Mikkel Oscar Lyderik <mikkeloscar@gmail.com> | 2015-12-25 15:59:00 +0100 |
---|---|---|
committer | Mikkel Oscar Lyderik <mikkeloscar@gmail.com> | 2015-12-25 15:59:00 +0100 |
commit | 26d23810406df9dd7f09df18087618c631e37040 (patch) | |
tree | f60d3559229b0523ca3215cbd604dc2db19faaf9 | |
parent | swaybar: Fix json related crash. (diff) | |
download | sway-26d23810406df9dd7f09df18087618c631e37040.tar.gz sway-26d23810406df9dd7f09df18087618c631e37040.tar.zst sway-26d23810406df9dd7f09df18087618c631e37040.zip |
swaybar: remove random whitespaces
-rw-r--r-- | swaybar/main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/swaybar/main.c b/swaybar/main.c index b6d93f4b..434d7363 100644 --- a/swaybar/main.c +++ b/swaybar/main.c | |||
@@ -426,14 +426,14 @@ void render() { | |||
426 | get_text_size(window, &width, &height, "%s", block->full_text); | 426 | get_text_size(window, &width, &height, "%s", block->full_text); |
427 | 427 | ||
428 | int textwidth = width; | 428 | int textwidth = width; |
429 | 429 | ||
430 | if (width < block->min_width) { | 430 | if (width < block->min_width) { |
431 | width = block->min_width; | 431 | width = block->min_width; |
432 | } | 432 | } |
433 | 433 | ||
434 | moved += width + block->separator_block_width; | 434 | moved += width + block->separator_block_width; |
435 | blockpos = window->width - margin - moved; | 435 | blockpos = window->width - margin - moved; |
436 | 436 | ||
437 | int offset = 0; | 437 | int offset = 0; |
438 | 438 | ||
439 | if (strncmp(block->align, "left", 5) == 0) { | 439 | if (strncmp(block->align, "left", 5) == 0) { |
@@ -503,7 +503,7 @@ void free_status_block(void *item) { | |||
503 | return; | 503 | return; |
504 | } | 504 | } |
505 | struct status_block *sb = (struct status_block*)item; | 505 | struct status_block *sb = (struct status_block*)item; |
506 | if (sb->full_text) { | 506 | if (sb->full_text) { |
507 | free(sb->full_text); | 507 | free(sb->full_text); |
508 | } | 508 | } |
509 | if (sb->short_text) { | 509 | if (sb->short_text) { |
@@ -722,7 +722,7 @@ void i3json_ensure_free(int min_free) { | |||
722 | len = strlen(i3json_state.buffer); | 722 | len = strlen(i3json_state.buffer); |
723 | } | 723 | } |
724 | if (i3json_state.bufsize < len+min_free) { | 724 | if (i3json_state.bufsize < len+min_free) { |
725 | i3json_state.bufsize += min_free; | 725 | i3json_state.bufsize += min_free; |
726 | if (i3json_state.bufsize > 1024000) { | 726 | if (i3json_state.bufsize > 1024000) { |
727 | sway_abort("Status line json too long or malformed."); | 727 | sway_abort("Status line json too long or malformed."); |
728 | } | 728 | } |