Open pvonmoradi opened 2 years ago
I don't think dunst has changed anything that could cause this issue. You can try an older version to verify, but otherwise I think the issue might lay at i3-gaps or your compositor.
@pvonmoradi I haven't seen this issue myself (I'm on wayland). Could you try to see if you can reproduce this issue with an older version of dunst?
@pvonmoradi I haven't seen this issue myself (I'm on wayland). Could you try to see if you can reproduce this issue with an older version of dunst?
Built v1.7.3
, used my old config (for this version) and tried the same commands. The issue does not appear:
https://user-images.githubusercontent.com/1058151/164428223-e29f8ad5-8c61-4d13-956e-f6da3b5a5bad.mp4
Here is the frames on the split second before rendering:
The black rectangle also is rendered here but it's size is the same as the actual notification balloon so the flashing effect wouldn't be as visible as the issue for v1.8.1
My guess is the bug is related to the new way of handling the geometry.
Yeah, it seems like the behaviour regressed, making it worse. If it's easy for you to reproduce, it would help if you bisect the issue to see where it was worsened.
I don't see anything that could impact this issue in the changes from 1.7.3 through 1.8.1. The new geometry was already implemented before the release of 1.7.3
@pvonmoradi Could you try bisecting the issue?
@fwsmit
1- I can't reproduce my earlier v.1.7.3 test here. Meaning the issue is even visible in that version.
2- I'm not using a compositor. When I use picom
, the issue does not appear (the black box is not rendered), so this may be a problem with my setup not dunst itself.
3- When I choose scale=1
in config, the issue does not appear, but in scale=2
, the issue appears again. It's as if the black rectangle is scaled according to this parameter!
It could be that there is always the possibility of it showing one frame of black, but when scale=2
the chance is higher, since the rendering takes longer. You could try setting the scale to something ridiculous like 10x and see if it happens more often.
@fwsmit You were right! I set it to 10, now it only shows a large black rectangle!
When I enable my compositor (picom):
Hmm, I didn't expect it to only show a black rectangle. I thought it would be a black rectangle and then show the notification
Just checked out 45ea305c8174a5a79f083484d5f2a510577db889
(where the scale
feature is added). I can reproduce the problem by setting scale to 10 where it only shows the black rectangle.
And the commit before that is not broken?
Because I think that the issue is just amplified by the scale option
And the commit before that is not broken?
Also reproducible in the commit #f12cc856617fedfc12729cd6b123a3c508c40f5d X11: Support for fractional scaling
.
Not reproducible in the commit #6d41d1c542b2c18c0803ce9b6fd54bc0b35e24b4 Merge pull request #891 from vincentbernat/fix/test-label
(the commit before adding support for X11: enable dpi scaling
)
And I checked commit (X11: enable dpi scaling). The problem is introduced here. Not sure why I haven't caught this in previous versions of dunst.
Any update for this issue. I also face it with 1.9.2 version. But if i use compositor (xcompmgr), the 'ghost rectangle' disappear.
I still don't know what causes the issue, so it's hard to fix. The commit suggested by pvonmoradi doesn't seem to introduce the issue, but potentially make it stand out more if you set a bigger scale.
Could you try removing this line
diff --git a/src/x11/x.c b/src/x11/x.c
index 4407519..a36944c 100644
--- a/src/x11/x.c
+++ b/src/x11/x.c
@@ -757,7 +757,7 @@ void x_win_show(window winptr)
XMapRaised(xctx.dpy, win->xwin);
win->visible = true;
- x_display_surface(win->root_surface, win, &win->dim);
+ //x_display_surface(win->root_surface, win, &win->dim);
}
/*
Issue description
When I issue a notification via
notify-send
, for a split second, an empty window is shown in place of the notification rectangle. This very brief "ghost rectangle" is larger than the size of the actual notification balloon. I did not have this problem with previous versions of dunst. Here is a screen cast. The ghost black rectangle is visible in 1st and 4th notify-send commands. It is not visible in 2nd and 3rd invocations.https://user-images.githubusercontent.com/1058151/160141165-37364615-7db4-46a1-9f14-2835e8a3b8a5.mp4
Installation info
v1.8.1
manual build
i3-gaps
This dunstrc does not contain icon path and colors.
Minimal dunstrc
```ini # See dunst(5) for all configuration options [global] ### Display ### # Which monitor should the notifications be displayed on. monitor = 0 # Display notification on focused monitor. Possible modes are: # mouse: follow mouse pointer # keyboard: follow window with keyboard focus # none: don't follow anything # # "keyboard" needs a window manager that exports the # _NET_ACTIVE_WINDOW property. # This should be the case for almost all modern window managers. # # If this option is set to mouse or keyboard, the monitor option # will be ignored. follow = mouse ### Geometry ### # dynamic width from 0 to 300 width = (0, 300) # constant width of 300 # width = 300 # The maximum height of a single notification, excluding the frame. height = 300 # Position the notification in the top right corner origin = top-right # Offset from the origin offset = 20x20 # Scale factor. It is auto-detected if value is 0. scale = 0 # Maximum number of notification (0 means no limit) notification_limit = 5 ### Progress bar ### # Turn on the progess bar. It appears when a progress hint is passed with # for example dunstify -h int:value:12 progress_bar = true # Set the progress bar height. This includes the frame, so make sure # it's at least twice as big as the frame width. progress_bar_height = 10 # Set the frame width of the progress bar progress_bar_frame_width = 1 # Set the minimum width for the progress bar progress_bar_min_width = 150 # Set the maximum width for the progress bar progress_bar_max_width = 300 # Show how many messages are currently hidden (because of # notification_limit). indicate_hidden = yes # The transparency of the window. Range: [0; 100]. # This option will only work if a compositing window manager is # present (e.g. xcompmgr, compiz, etc.). (X11 only) transparency = 0 # Draw a line of "separator_height" pixel height between two # notifications. # Set to 0 to disable. separator_height = 2 # Padding between text and separator. padding = 8 # Horizontal padding. horizontal_padding = 8 # Padding between text and icon. text_icon_padding = 0 # Defines width in pixels of frame around the notification window. # Set to 0 to disable. frame_width = 2 # Defines color of the frame around the notification window. frame_color = "#aaaaaa" # Define a color for the separator. # possible values are: # * auto: dunst tries to find a color fitting to the background; # * foreground: use the same color as the foreground; # * frame: use the same color as the frame; # * anything else will be interpreted as a X color. separator_color = frame # Sort messages by urgency. sort = yes # Don't remove messages, if the user is idle (no mouse or keyboard input) # for longer than idle_threshold seconds. # Set to 0 to disable. # A client can set the 'transient' hint to bypass this. See the rules # section for how to disable this if necessary idle_threshold = 120 ### Text ### font = Roboto Light 9 # The spacing between lines. If the height is smaller than the # font height, it will get raised to the font height. line_height = 0 # Possible values are: # full: Allow a small subset of html markup in notifications: # bold # italic #strikethrough# underline # # For a complete reference see #