diff options
author | Konstantin Pospelov <kupospelov@gmail.com> | 2018-05-19 18:15:25 +0300 |
---|---|---|
committer | Konstantin Pospelov <kupospelov@gmail.com> | 2018-05-19 18:39:01 +0300 |
commit | fcc11f977102524d4f8fe78d60d9d99936b15b67 (patch) | |
tree | f5af1cbf8fcf127fdf602c5392003521dfe165d9 /sway/desktop | |
parent | Merge pull request #2004 from RyanDwyer/rebuild-textures-on-move (diff) | |
download | sway-fcc11f977102524d4f8fe78d60d9d99936b15b67.tar.gz sway-fcc11f977102524d4f8fe78d60d9d99936b15b67.tar.zst sway-fcc11f977102524d4f8fe78d60d9d99936b15b67.zip |
Fix pixel bar below title
This commit changes how the left and right indents are calculated for the
title bottom pixel bar, so that it is displayed properly in case the left or
right border is hidden.
Diffstat (limited to 'sway/desktop')
-rw-r--r-- | sway/desktop/output.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index 94562052..ebb3ddaa 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c | |||
@@ -383,21 +383,21 @@ static void render_container_simple_border_normal(struct sway_output *output, | |||
383 | scale_box(&box, output_scale); | 383 | scale_box(&box, output_scale); |
384 | render_rect(output->wlr_output, output_damage, &box, color); | 384 | render_rect(output->wlr_output, output_damage, &box, color); |
385 | 385 | ||
386 | // Setting these makes marks and title easier | ||
387 | size_t inner_x = con->x + view->border_thickness * view->border_left; | ||
388 | size_t inner_width = con->width - view->border_thickness * view->border_left | ||
389 | - view->border_thickness * view->border_right; | ||
390 | |||
386 | // Single pixel bar below title | 391 | // Single pixel bar below title |
387 | memcpy(&color, colors->border, sizeof(float) * 4); | 392 | memcpy(&color, colors->border, sizeof(float) * 4); |
388 | color[3] *= con->alpha; | 393 | color[3] *= con->alpha; |
389 | box.x = con->x + view->border_thickness; | 394 | box.x = inner_x; |
390 | box.y = view->y - 1; | 395 | box.y = view->y - 1; |
391 | box.width = con->width - view->border_thickness * 2; | 396 | box.width = inner_width; |
392 | box.height = 1; | 397 | box.height = 1; |
393 | scale_box(&box, output_scale); | 398 | scale_box(&box, output_scale); |
394 | render_rect(output->wlr_output, output_damage, &box, color); | 399 | render_rect(output->wlr_output, output_damage, &box, color); |
395 | 400 | ||
396 | // Setting these makes marks and title easier | ||
397 | size_t inner_x = con->x + view->border_thickness * view->border_left; | ||
398 | size_t inner_width = con->width - view->border_thickness * view->border_left | ||
399 | - view->border_thickness * view->border_right; | ||
400 | |||
401 | // Marks | 401 | // Marks |
402 | size_t marks_width = 0; | 402 | size_t marks_width = 0; |
403 | if (config->show_marks && marks_texture) { | 403 | if (config->show_marks && marks_texture) { |