Zren / plasma-applet-eventcalendar

https://store.kde.org/p/998901/
465 stars 92 forks source link

Conflict with latte-dock #60

Open werunom opened 5 years ago

werunom commented 5 years ago

Problem Having the event-calendar desktop-widget prevents latte-dock from showing notifications.

How to reproduce When I am using latte-dock and have event-calendar widget in the desktop (not in the latte-dock), then the notifications from the system-tray widget (e.g., battery notifications, kde-konnect notifications, etc.) are not shown.

More info Please see here the full discussion of the bug. I first thought it is an issue with latte-dock. Further analysis pointed that the issue might be with event-calendar widget.

Zren commented 5 years ago

Oh... fuck. This'll be tricky.

I'm using the "notifications" dataengine in order to send notifications, just like a couple of other widgets (but no where as much as this widget). DataEngines allow data to be shared between widgets, but not between processes. Desktop Widgets are in plasmashell, while the Notifications widget is in the latte-dock panel.

You wont receive notifications from the kdeplasma-addons "Timer" widget as a destkop widget either. This is what I based my notifications code on. I'm not sure if there's other widgets that use this method.

https://github.com/KDE/kdeplasma-addons/blob/master/applets/timer/package/contents/ui/main.qml#L109

Hmmm, can't read the full latte bug report atm, will check it tonight.

Maybe we can use a qdbus command or something.

Zren commented 4 years ago

I misinterpreted this bug. Apparently it also affects the default Timer widget in kdeplasma-addons that I based my timer off of. Apparently connecting to the "notifications" dataengine, even if it's just to send operation calls, causes Latte to think I'm a Notification server (which displays the notifications).

The solution is the same (don't use the dataengine). Timer notifications already use my notification.py script to add actions/buttons. I've been holding back migrating Google Calendar event notifications because I don't want to send unvetted user data via the command line. Google Calendar has been known to auto-add events from spam.

I'd prefer to use notification.py, but I'm not certain how well I've escaped quotes in ExecUtil.exec().

devillemereuil commented 4 years ago

@Zren If the commits above are supposed to be enough to fix the issue, I'm sorry to report, the issue is still there on my computer using git master. Let me know if there is more information I can provide.

Zren commented 4 years ago

@devillemereuil Can you try again. I accidentally had a leftover 2nd instance of the DataSource { engine: "notifications" } in TimerView.qml apparently. Seems I forgot to remove it when I first moved to NotificationManager.qml.

devillemereuil commented 4 years ago

@Zren Yes, I can confirm, the problem is solved on my system. Thank you very much for this great work!