Code Monkey home page Code Monkey logo

Comments (8)

Coacher avatar Coacher commented on May 30, 2024

For example, dunst and lxqt-notificationd don't have this problem on my machine.
Other applications are also rendered normally.

from eventd.

sardemff7 avatar sardemff7 commented on May 30, 2024

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);

from eventd.

Coacher avatar Coacher commented on May 30, 2024

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.

from eventd.

sardemff7 avatar sardemff7 commented on May 30, 2024

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);

from eventd.

Coacher avatar Coacher commented on May 30, 2024

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.

from eventd.

Coacher avatar Coacher commented on May 30, 2024

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.

from eventd.

sardemff7 avatar sardemff7 commented on May 30, 2024

Ok, pushed non-updated new patch as 977ba0e.
Thanks for testing.

from eventd.

Coacher avatar Coacher commented on May 30, 2024

Thank you very much for fixing this.

from eventd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.