SUMMARY Notifications created through the Notification portal do not have ActionInvoked signals emitted when clicked STEPS TO REPRODUCE 1. Create a notification with the Notification portal with an action. I'm doing this by running an electron app with libnotify within a flatpak & executing `new Notification("hi").onclick = () => console.log("clicked")` 2. Click the notification OBSERVED RESULT When clicking the notification no ActionInvoked signal is emitted. confirmed by seeing no "clicked" log message. Running dbus-monitor shows the signal is not fired. EXPECTED RESULT The signal is fired allowing the app to trigger actions while sandboxxed. SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 6.3.2 KDE Frameworks Version: 6.11.0 Qt Version: 6.8.2 ADDITIONAL INFORMATION libnotify uses the raw dbus protocol when not sandboxed which is why this isnt an issue for non-sandboxxed apps. ActionInvoked is triggered correctly on click when creating the notification with the Notify method.
Thank you for the bug report! However Plasma 6.2.5 is no longer eligible for support or maintenance from KDE; supported versions are 5.27. (LTS), and 6.3 (non-LTS) or newer. Please upgrade to a supported version as soon as your distribution makes it available to you. Plasma is a fast-moving project, and bugs in one version are often fixed in the next one. If you need support for Plasma 6.2.5, please contact your distribution, who bears the responsibility of providing support for older releases that are no longer supported by KDE. If you can reproduce the issue after upgrading to a supported version, feel free to re-open this bug report.
oops I mistagged
Notifications can only be clicked when they have a default action. Are you sure your notification has that? As far as I can tell xdg-desktop-portal-kde works as expected, tested with xdg-portal-test-kde and ashpd-demo. I'd suspect that this is broken on the application side. https://gitlab.gnome.org/GNOME/libnotify/-/issues/50 seems relevant
.
Sorry for the slow reply, the issue you linked is most definitely related as the reporter is also on Plasma.. Notifications created through the portal with `default-action` on Gnome handle click events just fine which is what lead to me reporting it against kde. Looking further tho shows that libnotify is creating these `default-action` notifications without a `default-action-target`. Ashpd-demo does so I can confirm its not KDE's fault. Odd that Gnome's portal works without `default-action-target`
Actually I just realized that `default-action-target` is optional so this is kde's fault? ``` ASHPD Demo: method call time=1742763220.456704 sender=:1.1105 -> destination=org.freedesktop.portal.Desktop serial=36 path=/org/freedesktop/portal/desktop; interface=org.freedesktop.portal.Notification; member=AddNotification string "ashpd" array [ dict entry( string "title" variant string "" ) dict entry( string "body" variant string "" ) dict entry( string "priority" variant string "high" ) dict entry( string "default-action" variant string "" ) dict entry( string "default-action-target" variant variant string "" ) ] signal time=1742763223.140762 sender=:1.17 -> destination=:1.1105 serial=5089 path=/org/freedesktop/portal/desktop; interface=org.freedesktop.portal.Notification; member=ActionInvoked string "ashpd" string "" array [ variant variant string "" ] Electron with the mentioned JS: method call time=1742763231.236882 sender=:1.1107 -> destination=:1.17 serial=31 path=/org/freedesktop/portal/desktop; interface=org.freedesktop.portal.Notification; member=AddNotification string "libnotify-flatpak.(null)-electron-2" array [ dict entry( string "title" variant string "" ) dict entry( string "body" variant string "" ) dict entry( string "default-action" variant string "default" ) dict entry( string "priority" variant string "normal" ) ] ```
A possibly relevant merge request was started @ https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/merge_requests/371
Fixed by Kylie CT with https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/commit/1210bd0c654d92e3eddca2da405c454fed540125 in Plasma 6.4.1!