Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"reason" value in NotificationClosed signal seems to not follow freedesktop spec #129

Open
tofurky opened this issue Apr 20, 2018 · 0 comments

Comments

@tofurky
Copy link

tofurky commented Apr 20, 2018

Expected behaviour

When manually closing a notification by clicking the "x" in the upper right of the notification bubble, the NotificationClosed signal for that notification should show the reason as being dismissed by user (reason=2).

Per the spec for the NotificationClosed signal:

Table 8. NotificationClosed Parameters

Name	Type	Description
id	UINT32	The ID of the notification that was closed.
reason	UINT32	
The reason the notification was closed.

Name | Type | Description
-- | -- | --
id | UINT32 | The ID of the notification that was closed.
reason | UINT32 | The reason the notification was closed.
   1 - The notification expired.
   2 - The notification was dismissed by the user.
   3 - The notification was closed by a call to CloseNotification.
   4 - Undefined/reserved reasons.

Actual behaviour

The NotificationClosed signal sends reason=1 "The notification expired" when clicking the "x" in the upper-right of the notification bubble. Clicking the body of the notification does send reason=2 as would be expected. An expired notification also sends reason=1 as expected. The "coco" theme doesn't appear to be affected by this, as there is no "x" to click in that case.

Example "dbus-monitor" capture when clicking "x" to dismiss:

method call time=1524218596.200121 sender=:1.1389 -> destination=:1.1391 serial=7 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=Notify
   string "notify-send"
   uint32 0
   string ""
   string "bugreport"
   string ""
   array [
   ]
   array [
      dict entry(
         string "urgency"
         variant             byte 1
      )
   ]
   int32 5000
signal time=1524218598.413795 sender=:1.1391 -> destination=:1.1389 serial=14 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=NotificationClosed
   uint32 1
   uint32 1

Steps to reproduce the behaviour

As the user running mate-notification-daemon, open a terminal and execute the following to monitor the session bus:
dbus-monitor --session interface='org.freedesktop.Notifications'

In another terminal execute the following to send a notification using the "notify-send" utility (from libnotify-bin in Debian/Ubuntu):
notify-send -t 5000 bugreport

Click the "x" to manually close the notification within 5s.

If you inspect the output of dbus-monitor, you will see that the reason is given as "1", incorrectly signifying that the notification expired.

MATE general version

1.18.0

Package version

1.18.0-2ubuntu1

Linux Distribution

Ubuntu 17.10 amd64

Link to downstream report of your Distribution

N/A


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant