-
Notifications
You must be signed in to change notification settings - Fork 40
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
Closing updated notifications is impossible or requires many clicks #99
Comments
Those notifications also seem to crash the notification center sometimes, but it's pretty random so I don't have a way to reproduce it yet. Error message is:
Also sometimes those notifications forcefully close the drawer or prevent it from being opened, don't know how to reliably reproduce this either. EDIT: opened #101 for this specifically |
Inspecting the source code at the given position (in the error): linux_notification_center/src/NotificationCenter/Notifications/NotificationPopup.hs Lines 129 to 158 in a155a6b
You can see that there is an edge-case (I think) where valid is True (so the mouse button pressed is in the list, the dismiss button also is, and the default action also is), but where you did not press any of the dismiss button or the default action, which according to linux_notification_center/src/Config.hs Lines 138 to 139 in a155a6b
mouse1 (left click I believe) or mouse3 (right click) or some custom value in your configuration. Because you did not share any of your configuration, I'm assuming you have the default one from now on.
There should be a case where | valid -> do
putStrLn $ "Mouse button " <> mouseButton <> " has been recognized as a valid input but is not configured"
notiOnClosed noti $ User
onClose
-- or do a better action there, up to you should fix it. I do believe this helped isolating this issue, if really it was it. Can you confirm that pressing a non-configured button happens to crash the notification center? |
Yes, the issue with notification center crashing was indeed because I made a middle mouse button click on one of the notifications. This is probably separate from my main issue, so I'll report a new one. |
Thanks for reporting :) The fix proposed by @Mesabloo should work (to fix #101). If you want, open a working PR and I'll merge it. Otherwise, I will do it, but don't know when, yet I, too, had the issue with not being able to close notifications but I couldn't produce a fix for it, yet. If it helps, for the time being, you can open and close the notification center to make notifications disappear, or you can bind |
First of all, this is a really cool project, thank you for developing and maintaining it!
Note: I'm using this on sway but with
GDK_BACKEND=x11
. All other features work (surprisingly) well, so I don't think this bug is Xwayland-related, but at the same time I don't have an X11 box to check that it's not.Anyways, I have this project: https://github.com/balsoft/simple-osd-daemons/ which shows on-screen display for volume via pulseaudio and the currently playing song via mpris. To achieve this, it creates notifications when it first receives an event from pulseaudio or mpris, and then updates those notifications upon subsequent events. This works pretty well with mako, which I used previously, but for some reason with linux_notification_center I can't close those notifications by either clicking on them with mouse1 or dismissing them from the notification drawer. I can easily close most other notifications (from notify-send, firefox, etc), and I can also close notifications from simple-osd-daemons if they weren't updated (e.g. when I just change the volume once and then dismiss the notification) so I assume this is either a problem with my project somehow not following the spec or with linux_notification_center. Help would be appreciated either way.
The text was updated successfully, but these errors were encountered: