aboutsummaryrefslogtreecommitdiff
path: root/src/draw.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/draw.c')
-rw-r--r--src/draw.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/draw.c b/src/draw.c
index 549c360..9fcc54b 100644
--- a/src/draw.c
+++ b/src/draw.c
@@ -54,7 +54,7 @@ void draw_paint(Drawer *draw, Window *win)
cairo_t *cr = cairo_create(surface);
cairo_set_fill_rule(cr, CAIRO_FILL_RULE_EVEN_ODD);
- cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
+ cairo_set_operator(cr, CAIRO_OPERATOR_OVER);
double degree = M_PI / 180.0;
@@ -70,6 +70,8 @@ void draw_paint(Drawer *draw, Window *win)
int radius = layout->height / 2;
+ cairo_push_group(cr);
+
Color color = layout->btn->color;
cairo_set_source_rgba(cr, color.r, color.g, color.b, color.a);
cairo_new_sub_path(cr);
@@ -104,6 +106,9 @@ void draw_paint(Drawer *draw, Window *win)
animation_destroy(layout->btn->anim);
layout->btn->anim = NULL;
}
+
+ cairo_pop_group_to_source(cr);
+ cairo_paint(cr);
}
cairo_destroy(cr);