As of recently, unmount notifications are missing (or possibly displayed/dismissed very quickly) when unmounting a device. Possibly related to: https://bugzilla.xfce.org/show_bug.cgi?id=10792. As per a discussion at: https://forum.xfce.org/viewtopic.php?pid=49058#p49058, downgrading thunar to 1.6.15 and xfdesktop to 4.12.4 makes notifications appear again. Arch bug report located here: https://bugs.archlinux.org/task/59452.
Created attachment 7903 notifications I cannot reproduce, just like you, I get very quick notifications. I'm using both Thunar and xfdesktop from git master, although I don't see how xfdesktop could interfere.
Just had a closer look. Here is what I think is happening: In thunar-notify.c, thunar_notify_show(), the notification timeout is set to NOTIFY_EXPIRES_NEVER. And then later in thunar_notify_finish(), the notification is force closed. The problem, I believe, exists when the eject action in the system happens quickly. The notification is then shown and closed in rapid succession. To test this, I set NOTIFY_EXPIRES_DEFAULT and commented out the force close. Unfortunately, during an eject, the notification stayed on the screen indefinitely. I think the solution may be to program in a minimum time to display a notification (say 1 second) so that it doesn't disappear quickly in situations such as above. I'm not sure how to do that though.
Indeed, injecting a "sleep (1);" command just prior to the close call results in the notification staying open and visible for one second. On calls that take more than one second, it will add an extra second to display time.
Created attachment 7904 patch The attached patch accomplishes what you suggest and possibly fixes bug 10792. However, I'm not sure it fixes the problem reported in the forums, it could be quickly dismissed notifications or another completely problem. Let me know if the patch works for you.
By the way, I get the same almost non-visible notifications with 1.6.15.
Thanks. Patch works well. Will you back-port the patch to the 1.6 branch as well? I'll post back in the forum thread about the patch and see if they can test it to make determination.
On a second thought, I wonder if this is the "right fix". The only indication the operation (mount/eject) has been completed is the notification being dismissed, I don't think this is clear enough. Instead we can dismiss the current notification (as it is already) and send another one telling the operation has been completed (5s timeout). Note to myself: check notify_notification_set_timeout (notification, 2000) instead of g_timeout_add_seconds on thunar_notify_finish.
Or replace the current notification with notify_notification_update and set a timeout for it.
Created attachment 7908 [PATCH] Safe device removal notification An attempt at a patch. This closes off the "writing to the device" notification and then displays a new one that states the device can be safely removed.
Just tested both patches @ToZ Nice, just IMO one thing missing: The notification should disappear on it's own after some seconds. As a user I dont want to click on a notification after each unmount. @Andre Miranda Yes, sending the message after the operation would be slightly better. The problem case "ongoing file copy" first made me struggle a bit, but actually that seems to be unrelated, since unmount during file copy will span alot of other windows which clearly show all options.
Created attachment 7910 Update notification @ToZ this is a simplified version of your patch, instead of creating a new notification, we just update the existing one and thunar_notify_finish is kept as generic as possible. In any case, the message only makes sense for ejecting devices, but it is also shown while unmounting non-removable devices and when the device operation was cancelled. We could send appropriate messages for each case, but I don't know how to get the operation type(unmount or eject) or if it was cancelled from thunar_device_operation_finish.
Created attachment 7911 Delayed dismiss This is a simpler implementation of my first patch to delay the removal of the notification.
Patch confirmed to work. Thanks.
Andre Miranda referenced this bugreport in commit 27d020375719b0b4cc89348ff9d9948a411c2bdd Add a small delay when dismissing notifications (Bug #14552) https://git.xfce.org/xfce/thunar/commit?id=27d020375719b0b4cc89348ff9d9948a411c2bdd
I pushed the simpler fix to master, we can revisit the improvement to inform users the operation has been completed in the future (please file a bug if interested). Thanks for reporting and testing.