aboutsummaryrefslogtreecommitdiff
path: root/sway/border.c
diff options
context:
space:
mode:
authorGuillaume Brogi <gui-gui@netcourrier.com>2016-08-11 23:30:58 +0200
committerGuillaume Brogi <gui-gui@netcourrier.com>2016-08-11 23:57:38 +0200
commitfc492a4da8e252ccb7969cfda60cf784cd511d9d (patch)
tree71fe95c7abea0412f73df3e4842b0a42c2097199 /sway/border.c
parent5c87cc7cb190fbc1ed2a8e8e9d10208a6384e21c (diff)
Add support for indicator color
Diffstat (limited to 'sway/border.c')
-rw-r--r--sway/border.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/sway/border.c b/sway/border.c
index 0d3cfab8..5cb02274 100644
--- a/sway/border.c
+++ b/sway/border.c
@@ -102,6 +102,8 @@ static void render_borders(swayc_t *view, cairo_t *cr, struct border_colors *col
struct wlc_geometry *g = &view->border->geometry;
struct wlc_geometry *b = &view->border_geometry;
struct wlc_geometry *v = &view->actual_geometry;
+ enum swayc_layouts layout = view->parent->layout;
+ uint32_t color;
int x = b->origin.x - g->origin.x;
int y = b->origin.y - g->origin.y;
@@ -119,8 +121,13 @@ static void render_borders(swayc_t *view, cairo_t *cr, struct border_colors *col
// right border
int right_border = b->size.w - v->size.w - left_border;
if (right_border > 0) {
+ if (layout == L_HORIZ) {
+ color = colors->indicator;
+ } else {
+ color = colors->child_border;
+ }
render_sharp_line(cr,
- colors->child_border,
+ color,
x + b->size.w - right_border,
y,
right_border,
@@ -140,8 +147,13 @@ static void render_borders(swayc_t *view, cairo_t *cr, struct border_colors *col
// bottom border
int bottom_border = b->size.h - (top_border + v->size.h);
if (bottom_border > 0) {
+ if (layout == L_VERT) {
+ color = colors->indicator;
+ } else {
+ color = colors->child_border;
+ }
render_sharp_line(cr,
- colors->child_border,
+ color,
x,
y + b->size.h - bottom_border,
b->size.w,