<table><tr><td style="">albertvaka added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D4215" rel="noreferrer">View Revision</a></tr></table><br /><div><div><blockquote style="border-left: 3px solid #8C98B8;
color: #6B748C;
font-style: italic;
margin: 4px 0 12px 0;
padding: 8px 12px;
background-color: #F8F9FC;">
<div style="font-style: normal;
padding-bottom: 4px;">In <a href="https://phabricator.kde.org/D4215#79400" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;" rel="noreferrer">D4215#79400</a>, <a href="https://phabricator.kde.org/p/mck182/" style="
border-color: #f1f7ff;
color: #19558d;
background-color: #f1f7ff;
border: 1px solid transparent;
border-radius: 3px;
font-weight: bold;
padding: 0 4px;" rel="noreferrer">@mck182</a> wrote:</div>
<div style="margin: 0;
padding: 0;
border: 0;
color: rgb(107, 116, 140);"><p>Fair enough.</p>
<p>Let's make a step back then. Since you've mentioned "Plasma is the only notification system that does close-on-activate instead of executing some action", can you actually list what happens elsewhere? How is default action implemented in Gnome? What happens when there are regular and a default action? Can you give at least 3 actual examples? Ubuntu's Unity? I think it'd be great if everyone could get better idea and understanding of how others handle this and perhaps then come up with something fitting for Plasma. I'll test how does macOS behave.</p></div>
</blockquote>
<p><strong>GNOME Shell</strong> (3.18) does the same as the proposed patch: once clicked the notification runs the default action (if any) and disappears.</p>
<p><a href="https://phabricator.kde.org/F2163267" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;" rel="noreferrer">F2163267: gnome.png</a></p>
<p><strong>Unity</strong> (7.4.0, from Ubuntu 16.04 LTS) is a bit crazy: if the notification doesn't have any action and is transient, then it is displayed as a floating balloon. However, if there are any actions or the notification is persistent (timeout==0), then it displays as a dialog instead! Also, I've found that Unity notifications system doesn't declare the "actions" capability on DBus, so KNotifications will never set any action under Unity :/</p>
<p><a href="https://phabricator.kde.org/F2163269" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;" rel="noreferrer">F2163269: unity.png</a></p>
<p><a href="https://phabricator.kde.org/F2163271" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;" rel="noreferrer">F2163271: unity2.png</a></p>
<p><strong>Windows</strong> has two different APIs (the old one from Windows XP and the new one since Windows 8), but essentially it does the same thing as Gnome or Plasma with this patch: if the user clicks the notification it is dismissed and it might run a default action. The new API lets you add additional action buttons (and any arbitrary controls) in addition to the default action.</p>
<p><strong>Android</strong>: If an app doesn't provide a default action (PendingIntent), then it does nothing on click. It must be dismissed by swiping it away.</p>
<p><strong>iOS</strong>: When the users taps on a notification, the app opens and receives a callback. If you don't implement anything there, they your app will just open.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R120 Plasma Workspace</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D4215" rel="noreferrer">https://phabricator.kde.org/D4215</a></div></div><br /><div><strong>EMAIL PREFERENCES</strong><div><a href="https://phabricator.kde.org/settings/panel/emailpreferences/" rel="noreferrer">https://phabricator.kde.org/settings/panel/emailpreferences/</a></div></div><br /><div><strong>To: </strong>albertvaka, Plasma, colomar<br /><strong>Cc: </strong>broulik, apol, mck182, plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas<br /></div>