diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2018-05-14 09:04:18 -0400 |
---|---|---|
committer | Brian Ashworth <bosrsf04@gmail.com> | 2018-05-14 09:04:18 -0400 |
commit | 77b42ec8216ec785e3981617c5afbb16c1cd31d7 (patch) | |
tree | b8f5db6578b13653d9650a11ed22f9d2ad6250ce | |
parent | Fix y and height for a hidden top normal border (diff) | |
download | sway-77b42ec8216ec785e3981617c5afbb16c1cd31d7.tar.gz sway-77b42ec8216ec785e3981617c5afbb16c1cd31d7.tar.zst sway-77b42ec8216ec785e3981617c5afbb16c1cd31d7.zip |
Always render top border for border normal
-rw-r--r-- | sway/desktop/output.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index 705e542a..577279ac 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c | |||
@@ -365,16 +365,14 @@ static void render_container_simple_border_normal(struct sway_output *output, | |||
365 | render_rect(output->wlr_output, output_damage, &box, color); | 365 | render_rect(output->wlr_output, output_damage, &box, color); |
366 | } | 366 | } |
367 | 367 | ||
368 | if (con->sway_view->border_top) { | 368 | // Single pixel bar above title |
369 | // Single pixel bar above title | 369 | memcpy(&color, colors->border, sizeof(float) * 4); |
370 | memcpy(&color, colors->border, sizeof(float) * 4); | 370 | color[3] *= con->alpha; |
371 | color[3] *= con->alpha; | 371 | box.x = con->x; |
372 | box.x = con->x; | 372 | box.y = con->y; |
373 | box.y = con->y; | 373 | box.width = con->width; |
374 | box.width = con->width; | 374 | box.height = 1; |
375 | box.height = 1; | 375 | render_rect(output->wlr_output, output_damage, &box, color); |
376 | render_rect(output->wlr_output, output_damage, &box, color); | ||
377 | } | ||
378 | 376 | ||
379 | // Single pixel bar below title | 377 | // Single pixel bar below title |
380 | memcpy(&color, colors->border, sizeof(float) * 4); | 378 | memcpy(&color, colors->border, sizeof(float) * 4); |
@@ -390,11 +388,11 @@ static void render_container_simple_border_normal(struct sway_output *output, | |||
390 | color[3] *= con->alpha; | 388 | color[3] *= con->alpha; |
391 | box.x = con->x | 389 | box.x = con->x |
392 | + con->sway_view->border_thickness * con->sway_view->border_left; | 390 | + con->sway_view->border_thickness * con->sway_view->border_left; |
393 | box.y = con->y + con->sway_view->border_top; | 391 | box.y = con->y + 1; |
394 | box.width = con->width | 392 | box.width = con->width |
395 | - con->sway_view->border_thickness * con->sway_view->border_left | 393 | - con->sway_view->border_thickness * con->sway_view->border_left |
396 | - con->sway_view->border_thickness * con->sway_view->border_right; | 394 | - con->sway_view->border_thickness * con->sway_view->border_right; |
397 | box.height = con->sway_view->y - con->y - (con->sway_view->border_top + 1); | 395 | box.height = con->sway_view->y - con->y - 2; |
398 | render_rect(output->wlr_output, output_damage, &box, color); | 396 | render_rect(output->wlr_output, output_damage, &box, color); |
399 | 397 | ||
400 | // Title text | 398 | // Title text |