Closed Coacher closed 7 years ago
For example, dunst and lxqt-notificationd don't have this problem on my machine. Other applications are also rendered normally.
Do you use a compositing manager like compton? If not, please try this patch:
diff --git a/plugins/nd/src/backend-xcb.c b/plugins/nd/src/backend-xcb.c
index 412641ca..e4b9f225 100644
--- a/plugins/nd/src/backend-xcb.c
+++ b/plugins/nd/src/backend-xcb.c
@@ -654,8 +654,11 @@ _eventd_nd_xcb_surface_shape(EventdNdSurface *self)
shape = cairo_xcb_surface_create_for_bitmap(context->xcb_connection, context->screen, shape_id, self->width, self->height);
cr = cairo_create(shape);
+ cairo_set_source_rgba(cr, 0, 0, 0, 0);
+ cairo_paint(cr);
cairo_set_source_rgba(cr, 1, 1, 1, 1);
self->context->nd->notification_shape(self->notification, cr);
+ cairo_fill(cr);
cairo_destroy(cr);
cairo_surface_destroy(shape);
Do you use a compositing manager like compton?
No, I use plain Openbox WM.
If not, please try this patch
It didn't help. No visible changes at all.
New patch:
diff --git a/plugins/nd/src/backend-xcb.c b/plugins/nd/src/backend-xcb.c
index 412641ca..76749b5b 100644
--- a/plugins/nd/src/backend-xcb.c
+++ b/plugins/nd/src/backend-xcb.c
@@ -654,8 +654,10 @@ _eventd_nd_xcb_surface_shape(EventdNdSurface *self)
shape = cairo_xcb_surface_create_for_bitmap(context->xcb_connection, context->screen, shape_id, self->width, self->height);
cr = cairo_create(shape);
+ cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
cairo_set_source_rgba(cr, 1, 1, 1, 1);
self->context->nd->notification_shape(self->notification, cr);
+ cairo_fill(cr);
cairo_destroy(cr);
cairo_surface_destroy(shape);
New patch
I tried the patch you've added initially, i.e.
diff --git a/plugins/nd/src/backend-xcb.c b/plugins/nd/src/backend-xcb.c
index 412641ca..5b871b35 100644
--- a/plugins/nd/src/backend-xcb.c
+++ b/plugins/nd/src/backend-xcb.c
@@ -654,8 +654,12 @@ _eventd_nd_xcb_surface_shape(EventdNdSurface *self)
shape = cairo_xcb_surface_create_for_bitmap(context->xcb_connection, context->screen, shape_id, self->width, self->height);
cr = cairo_create(shape);
+ cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
+ cairo_set_source_rgba(cr, 0, 0, 0, 0);
+ cairo_paint(cr);
cairo_set_source_rgba(cr, 1, 1, 1, 1);
self->context->nd->notification_shape(self->notification, cr);
+ cairo_fill(cr);
cairo_destroy(cr);
cairo_surface_destroy(shape);
And it fixed the problem for me. Let me try with the updated patch.
New patch
Updated patch, i.e.
diff --git a/plugins/nd/src/backend-xcb.c b/plugins/nd/src/backend-xcb.c
index 412641ca..76749b5b 100644
--- a/plugins/nd/src/backend-xcb.c
+++ b/plugins/nd/src/backend-xcb.c
@@ -654,8 +654,10 @@ _eventd_nd_xcb_surface_shape(EventdNdSurface *self)
shape = cairo_xcb_surface_create_for_bitmap(context->xcb_connection, context->screen, shape_id, self->width, self->height);
cr = cairo_create(shape);
+ cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
cairo_set_source_rgba(cr, 1, 1, 1, 1);
self->context->nd->notification_shape(self->notification, cr);
+ cairo_fill(cr);
cairo_destroy(cr);
cairo_surface_destroy(shape);
didn't help. No changes whatsoever.
Ok, pushed non-updated new patch as 977ba0ea808cb6239b35fb296e12ede909a8b69d. Thanks for testing.
Thank you very much for fixing this.
Hello.
I am using eventd-git @ 9ed3f9d without any manual configuration. Every notification is displayed with some artefacts around it: https://i.imgur.com/xna3dWU.png
OS is Gentoo amd64, xorg-server-git @ 29a4f3db, mesa-13.0.2, i965 video chip.
I understand this is too little info, but I am ready to provide any other info per your request.
Please fix.