dunst-project / dunst

Lightweight and customizable notification daemon
https://dunst-project.org
Other
4.44k stars 338 forks source link

Transparency behind rounded corners. #1201

Closed misterhackerman closed 6 months ago

misterhackerman commented 10 months ago

dunst-request

Issue description

rounded corners in dunst notifications have this transperent square behind them dunstnew i use picom as a compositor. this issue appears when i enable shadow within dunstrc or enable blur in picom. dunst request fix same issue in this picture, but here also the gap is being recognized in picom as the notification

dunst in terminal gives me this: ( but i don't think it's related )

CRITICAL: Source ID 99 was not found when attempting to remove it CRITICAL: Source ID 106 was not found when attempting to remove it CRITICAL: Source ID 111 was not found when attempting to remove it CRITICAL: Source ID 134 was not found when attempting to remove it CRITICAL: Source ID 161 was not found when attempting to remove it CRITICAL: Source ID 192 was not found when attempting to remove it CRITICAL: Source ID 210 was not found when attempting to remove it CRITICAL: Source ID 260 was not found when attempting to remove it

Installation info

Minimal dunstrc ```ini # Dunstrc here [global] monitor = 0 follow = none width = 300 height = 300 origin = top-right offset = 20x50 scale = 0 notification_limit = 20 highlight="#FF470A" indicate_hidden = yes transparency = 0 separator_height = 2 padding = 15 horizontal_padding = 15 text_icon_padding = 40 sort = yes line_height = 0 markup = full format = "%s\n%b" alignment = left vertical_alignment = center ellipsize = middle show_indicators = yes corner_radius = 20 icon_corner_radius = 10 frame_width = 2 gap_size = 15 separator_color = frame frame_color = "#000000" [experimental] per_monitor_dpi = false [urgency_low] background = "#222222" foreground = "#888888" timeout = 10 [urgency_normal] background = "#151515bb" foreground = "#ffffff" frame_color = "#151515c8" timeout = 10 [urgency_critical] background = "#900000" foreground = "#ffffff" frame_color = "#ff0000" timeout = 0 ```
fwsmit commented 10 months ago

This is as expected, since dunst uses a single window for the notifications and uses transparency for achieving the gaps and corners. Is there some way this could be completely solved? Using multiple windows would help of course, but that is already an open issue.

iu0v1 commented 8 months ago

Hey! I had the same problem, and it took me a while to realise what was going on. Blur is a key issue here.

dunstrc
-------

[global]
  class = Dunst
picom.conf
----------

blur-background-exclude = [
  "class_g = 'Dunst'"
]

Restart Dunst and enjoy your crystal clear corners :)

misterhackerman commented 8 months ago

But wouldn't that just disable blur for the notifications?

iu0v1 commented 8 months ago

But wouldn't that just disable blur for the notifications?

Oh. I didn't take into account that the goal was to have a blur at the same time. I was too focused on the corners as prime problem. So yea. As far as I could understand, in the case of dunst the drawing takes place on a common transparent canvas. Therefore, any actions with the decorations reveal a transparent layer that is processed by a picom that adds blur to it. Therefore, the only choice left is whether to have blur but see these "artifacts", or to use clear transparency without blur.

misterhackerman commented 8 months ago

What I'm talking about is a rule for example that looks something like this (relatively speaking)

For class=dunst [ Border radius = 5 or something ]

In the picom configuration file + I'm on arch now

So this isn't a dunst problem anymore I guess

bynect commented 7 months ago

When there is a compositor dunst leaves the styling of corners (thus transparency in those spots) up to the compositor. So I think this is actually more of a problem with picom.

https://www.reddit.com/r/i3wm/comments/y2x243/picom_blurry_corners_when_using_rounded_corners/

https://github.com/yshui/picom/issues/775#issue-1125220338

I don't know if they are still relevant now, however this is a good place to start looking