DBus Notifications only work once (at least on X11)
Okabintaro opened this issue · 3 comments
Okabintaro commented
I noticed that DBus Notifications only fire once when using X11.
After the first notification arrives it seems that the DBus Listener crashes and doesn't work anymore.
Did some debugging and it seems that you will have to connect to DBus explicitly to make the Observer/Rule matcher work continuously:
I tried to do that quickly in the NotificaionManager.RegisterDbusAsync() but it doesn't seem to work:
...
private async Task RegisterDbusAsync()
{
var dbus = Connection.Session;
+ await dbus.ConnectAsync();
var rule = new MatchRule
{
Member = "Notify",
Interface = "org.freedesktop.Notifications",
Path = "/org/freedesktop/Notifications",
Type = MessageType.MethodCall,
Eavesdrop = true
};
...
Okabintaro commented
Seems to work and fixed now. Thanks!
VRcontrib commented
Thank you for fixing this!