Summary: | Actions in Notification portal totally broken | ||
---|---|---|---|
Product: | [Plasma] xdg-desktop-portal-kde | Reporter: | Ilya Fedin <fedin-ilja2010> |
Component: | general | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | aleixpol, butirsky, jgrulich, kdebugs.81do7, nate |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/plasma/xdg-desktop-portal-kde/commit/4f8df470f8b3b9df1844d606a05b3c83cce88772 | Version Fixed In: | 5.26.5 |
Sentry Crash Report: | |||
Attachments: |
AddNotification
ActionInvoked |
Description
Ilya Fedin
2022-11-26 16:21:39 UTC
I've been looking your report up, but I was unable to reproduce the behaviour you are describing. Would you be able to provide a small test app that exposes the problem? Regarding the latter case, it indeed is missing but is a separate issue. Created attachment 154117 [details]
AddNotification
Created attachment 154118 [details]
ActionInvoked
I don't think I'll be able to write a small test app (as GNotification uses ActivateAction, KNotification is written that it avoids this issue and writing new spec implementation wouldn't be small). What I propose instead is to look at d-bus traffic between the portal and any application using GNotification. Even though GNotification doesn't watch from ActionInvoked signal, it's seen that the content of the signal is broken. Here's a screenshot of the action list from Telegram and the ActionInvoked signal produced by the portal implementation. It's seen that Telegram has no numeric actions and has target parameter for every of them, but ActionInvoked content is completely different. It's also pretty obvious from the code: https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/blob/master/src/notification.cpp#L125 It should have some map between the uint id and action name/target parameter supplied by the application, but it just supplies the uint id from KNotification library instead. The application I use to monitor D-Bus traffic is Bustle A possibly relevant merge request was started @ https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/merge_requests/140 Git commit c53684f5b6d27b17938982e6333d574636dd4016 by Aleix Pol. Committed on 15/12/2022 at 00:52. Pushed by apol into branch 'master'. notifications: Properly communicate the triggered action Infer the action name from the originally communicated action name. M +34 -10 src/notification.cpp https://invent.kde.org/plasma/xdg-desktop-portal-kde/commit/c53684f5b6d27b17938982e6333d574636dd4016 Git commit 77c312560f0d240a553c074d96df438c75e1430a by Aleix Pol Gonzalez, on behalf of Aleix Pol. Committed on 15/12/2022 at 00:00. Pushed by apol into branch 'master'. notification: Trigger org.freedesktop.Application.Activate* as spec'd For some reason, it was spec'd that these should be called, so we better follow through. A +17 -0 data/org.freedesktop.Application.xml M +2 -0 src/CMakeLists.txt M +24 -5 src/notification.cpp https://invent.kde.org/plasma/xdg-desktop-portal-kde/commit/77c312560f0d240a553c074d96df438c75e1430a A possibly relevant merge request was started @ https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/merge_requests/142 Git commit 4f8df470f8b3b9df1844d606a05b3c83cce88772 by Aleix Pol. Committed on 15/12/2022 at 15:02. Pushed by apol into branch 'Plasma/5.26'. notifications: Properly communicate the triggered action Infer the action name from the originally communicated action name. (cherry picked from commit c53684f5b6d27b17938982e6333d574636dd4016) M +34 -10 src/notification.cpp https://invent.kde.org/plasma/xdg-desktop-portal-kde/commit/4f8df470f8b3b9df1844d606a05b3c83cce88772 Git commit 511bced812cc0615dfa8b827a1c108db4b3e919f by Aleix Pol. Committed on 15/12/2022 at 15:02. Pushed by apol into branch 'Plasma/5.26'. notification: Trigger org.freedesktop.Application.Activate* as spec'd For some reason, it was spec'd that these should be called, so we better follow through. (cherry picked from commit 77c312560f0d240a553c074d96df438c75e1430a) A +17 -0 data/org.freedesktop.Application.xml M +2 -0 src/CMakeLists.txt M +24 -5 src/notification.cpp https://invent.kde.org/plasma/xdg-desktop-portal-kde/commit/511bced812cc0615dfa8b827a1c108db4b3e919f |