KNotification uses transient=true hint incorrectly
please forgive me for re-raising this issue here, but it has not received any attention at https://bugs.kde.org/show_bug.cgi?id=422042
I see the notice that issues here are only to be used by contributors or developers, but I feel justified to post here as I do plan to fix this issue myself, but I'd like some input / discussion before I do.
Here the original issue:
SUMMARY
KNotification turns transient=true if persistent=false. But according to the specs, those 2 things > are completely different and should not be connected in this way.
The spec https://developer.gnome.org/notification-spec/ has 2 hints: resident -> information how to display a notification (basically saying timeout = infinity) transient -> information how to handle a notification (eg to log it or to discard it)
I haven't looked into it to much, but as far as I can tell from https://invent.kde.org/frameworks/knotifications/-/blob/master/src/notifybypopup.cpp#L297 KNotification will do the following:
if (persistent == true) timeout = 0 (infinite) else transient = true
I believe a notification framework should expose an api for applications to set transient and resident directly and independent of each other.
I have observed this behavior in applications that use KNotification on non KDE plasma desktops (xfce+xfce-notifyd, i3+dunst). If and how a plasma desktop is effected I have not tested.
STEPS TO REPRODUCE
- use xfce-notifyd or dunst as notification daemon
- trigger a notification via NotifyByPopupPrivate::sendNotificationToServer (for example the quassel irc client does that for private messages if the irc client is not focused)
- observe the dbus messages.
OBSERVED RESULT
The application does not set transient, but the dbus message contains a transient=true hint.
Here the output of dbus-monitor when receving a notification in the quassel irc client: http://paste.zauberfisch.com/t/5ecb18a069345/quassel-notify.txt
EXPECTED RESULT
The application should not set transient=true, unless the application has specified to do so.
SOFTWARE/OS VERSIONS OS: arch linux DE: xfce, i3 KDE Frameworks Version: 5.70.0 Qt Version: 5.14.2
ADDITIONAL INFORMATION
I believe this issue on the xfce-notifyd bugtracker is related: https://gitlab.xfce.org/apps/xfce4-notifyd/-/issues/25