From 400767dae1316df25fd8b140a40c24cf942f2535 Mon Sep 17 00:00:00 2001 From: wochap Date: Tue, 4 Jun 2024 16:02:25 -0500 Subject: implement borders patch tihs patch adds 2 extra borders relative to the client, they don't change the size of the client --- client.h | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'client.h') diff --git a/client.h b/client.h index 6eefa0e..485607c 100644 --- a/client.h +++ b/client.h @@ -326,7 +326,7 @@ client_send_close(Client *c) } static inline void -client_set_border_color(Client *c, const float color[static 4]) +client_set_border_color(Client *c, const float color[static 4], const float colors[static 4], const float colore[static 4]) { int i; @@ -345,8 +345,19 @@ client_set_border_color(Client *c, const float color[static 4]) } else color = color; - for (i = 0; i < 4; i++) - wlr_scene_rect_set_color(c->border[i], color); + + for (i = 0; i < 4; i++) { + if (border_color_type == BrdOriginal) { + wlr_scene_rect_set_color(c->border[i], color); + } else if (border_color_type == BrdStart) { + wlr_scene_rect_set_color(c->borders[i], colors); + } else if (border_color_type == BrdEnd) { + wlr_scene_rect_set_color(c->bordere[i], colore); + } else if (border_color_type == BrdStartEnd) { + wlr_scene_rect_set_color(c->borders[i], colors); + wlr_scene_rect_set_color(c->bordere[i], colore); + } + } } static inline void -- cgit v1.2.1