Closed dffischer closed 8 years ago
Thanks for sharing your findings. Maybe it will be useful in the future. Interesting.. I did some tests with Plasma 5. The results (for supported in P5 interactions), are as follow:
interaction | reason |
---|---|
none (timeout) | 1 |
clicked body | 2 |
clicked button | 3 |
clicked ✖ in top right | 2 |
The code herein is far from complete and more of a work in progress. It did not work on my setup, however I hope it can be useful to other window managers, so I leave it here.
In trying to solve #35, I found that libnotify exposes a
closed-reason
. Hoping this would enable to tell apart a timeout from a click to the notification body, I implemented its passing to the close handlers. Then, I tested this on my GNOME Shell 3.20 and found the following values.Dismisses all notifications
Shell seems to interpret this as "seen" and
destroys notification as mouse leaves body
Seems to be an extremely meaningful 2...
As GNOME seems to leave me with no chance to tell whether the notification was closed on purpose, I give up on this path and will have to be satisfied with the buttons.