From 2798807853d14104e3a72e1d7d682c085fd84724 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Mon, 24 Feb 2020 22:06:20 +0100 Subject: [PATCH] render: csd: render all borders and the title bar * Still no content in the title bar * Colors are temporary * No resize/drag yet --- render.c | 10 +++++++--- 1 file 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(