dunst
dunst copied to clipboard
dunst `-r` flag not respect `follow = keyboard`
Issue description
dunst not respect to follow config if you use -r flag
you can update specific notification with -r for example
dunstify -r 4 "first" ; sleep 2 ; dunstify -r 4 "second"
Update notification from one to secend but it is not commitment to follow config.
Steps to reproduce:
- set
follow = keyboardin config file - run
dunstify -r 4 "first" ; sleep 2 ; dunstify -r 4 "second" - you see
onein monitor 1 - Change keyboard focus to monitor 2
secondnot show in monitor 2.
What I expected: update notification should show in active monitor
Installation info
- Version:
1.9.2 - Install type:
package - Window manager:
dwl - Distro:
Arch
Minimal dunstrc
# Dunstrc here
If I'm not mistaken this is due to wlroots (Wayland) limitations. Fixing this would be incredibly hackish and therefore probably not worth implementing (I could be wrong, I'm not a wlroots guru). A nice workaround for this would be to send notifications to all monitors at once, unfortunately this is not yet supported (see #45).
Relevant code:
https://github.com/dunst-project/dunst/blob/91f3b9c206d7b1aac6d503cb7bd50f7495454741/src/wayland/wl.c#L388-L400
Currently there is no difference between follow mouse and keyboard on wayland. Dunst lets the compositor decide where to put the window. This is at the time of creating the notification.
Does closing the old notification before opening the second one open it on the right monitor?
Currently there is no difference between follow mouse and keyboard on wayland. Dunst lets the compositor decide where to put the window. This is at the time of creating the notification.
Does closing the old notification before opening the second one open it on the right monitor?
No. It is not shown on the right monitor when we have notification.
- focus keyboard and mouse on monitor 1
- run the script above
- see notification
firstas notification on monitor 1 - change focus of keyboard and mouse to monitor 2
- notification
secondstill appears on monitor 1 When you click to end the notification, the next notification appears on the currently active monitor.
Okay, so in theory Dunst could close the window and reopen it to make the notification appear on the new monitor. Only with the way that dunst currently shows notifications, in one window, it would move the other notifications as well. But only after sending a new notification. This makes the behavior in this specific case better, but in general you would want the notification to follow immediately. So a better solution is needed. But I don't know if one currently
I think first step is better to create new notification in focus monitor because users are actively working on that monitor. Maybe later we can find a solution to follow immediately.
To do that dunst would have to close the window and create a new window. All notifications would be moved over (until multiple windows are supported). But yeah that's possible