aboutsummaryrefslogtreecommitdiff
path: root/render.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-02-28 18:00:48 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-02-28 18:00:48 +0000
commitde9fcbc339ecca7b79dbe4c4af0c5114280b5c47 (patch)
treed91a078f14752cfdf8011fe741600bdc743d230c /render.c
parentrender: resize: change 'resize' log from info to debug (diff)
render: csd: use a struct for positioning information
Diffstat (limited to 'render.c')
-rw-r--r--render.c15
1 files 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 */