aboutsummaryrefslogtreecommitdiff
path: root/render.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-02-24 21:06:20 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-02-24 21:06:20 +0000
commit2798807853d14104e3a72e1d7d682c085fd84724 (patch)
tree2834b9b9fa28bdabedd855451da5e4846a01e643 /render.c
parentMerge branch 'master' into csd (diff)
render: csd: render all borders and the title bar
* Still no content in the title bar * Colors are temporary * No resize/drag yet
Diffstat (limited to 'render.c')
-rw-r--r--render.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/render.c b/render.c
index 0e019431..3e7f57b1 100644
--- a/render.c
+++ b/render.c
@@ -668,10 +668,14 @@ render_csd(struct terminal *term)
const int title_height = 20 * term->scale;
const int geom[5][4] = {
- {-border_width, -title_height, term->width + 2 * border_width, title_height},
+ {0, -title_height, term->width, title_height},
+ {-border_width, -title_height - border_width, term->width + 2 * border_width, border_width},
+ {-border_width, -title_height - border_width, border_width, term->height + title_height + 2 * border_width},
+ {term->width, -title_height - border_width, border_width, term->height + title_height + 2 * border_width},
+ {-border_width, term->height, term->width + 2 * border_width, border_width},
};
- for (size_t i = 0; i < 1; i++) {
+ for (size_t i = 0; i < 5; i++) {
const int x = geom[i][0];
const int y = geom[i][1];
const int width = geom[i][2];
@@ -680,7 +684,7 @@ render_csd(struct terminal *term)
unsigned long cookie = shm_cookie_csd(term, 0);
struct buffer *buf = shm_get_buffer(term->wl->shm, width, height, cookie);
- pixman_color_t color = color_hex_to_pixman(0xffffff);
+ pixman_color_t color = color_hex_to_pixman(i == 0 ? 0xffffff : 0xff0000);
pixman_image_t *src = pixman_image_create_solid_fill(&color);
pixman_image_fill_rectangles(