From de9fcbc339ecca7b79dbe4c4af0c5114280b5c47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Fri, 28 Feb 2020 19:00:48 +0100 Subject: [PATCH] render: csd: use a struct for positioning information --- render.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/render.c b/render.c index 2ceaa4fa..4dbf272a 100644 --- a/render.c +++ b/render.c @@ -683,7 +683,12 @@ render_csd(struct terminal *term) const int title_height = csd_title_size * term->scale; - const int geom[5][4] = { + const struct { + int x; + int y; + int width; + int height; + } geom[] = { /* X, Y, WIDTH, HEIGHT */ #if FOOT_CSD_OUTSIDE { 0, -title_height, term->width, title_height}, /* title */ @@ -708,10 +713,10 @@ render_csd(struct terminal *term) struct wl_surface *surf = term->window->csd.surface[i]; struct wl_subsurface *sub = term->window->csd.sub_surface[i]; - const int x = geom[i][0]; - const int y = geom[i][1]; - const int width = geom[i][2]; - const int height = geom[i][3]; + const int x = geom[i].x; + const int y = geom[i].y; + const int width = geom[i].width; + const int height = geom[i].height; if (width == 0 || height == 0) { /* CSD borders aren't rendered in maximized mode */