! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
[xfce4-notifyd] on update reset fade as well
Status:
RESOLVED: FIXED
Product:
Xfce4-notifyd
Component:
general

Comments

Description Christian Hesse 2015-04-27 01:39:16 CEST
Created attachment 6221 
on update reset fade as well

Let me give an example:

NotifyNotification *n;
notify_init("Test");
n = notify_notification_new ("Summary", "Body" NULL);
notify_notification_set_timeout(n, 1500);
notify_notification_show (n, NULL));
sleep(1);
notify_notification_update(n, "Test Timeout", "Body", NULL);
notify_notification_set_timeout(n, 10000);
notify_notification_show (n, NULL)):

This shows "Summary / Body", then starts to fade after just half a second.
After a full second the notification is updated to "Test Timeout / Body". The
fade continues and after a total of one and a half second the notification
has gone away.

I think the correct behavior is to cancel the fade, update the timeout and
show the updated notification for 10 seconds.
Comment 1 Christian Hesse 2016-07-04 20:10:26 CEST
Created attachment 6726 
on update reset fade as well

Update for git master...
Comment 2 Simon Steinbeiss editbugs 2016-07-11 22:02:57 CEST
Hi! Sorry there was no response on your bugreport and patch for so long and thanks for updating it for the latest changes in git master.

Do you have a small reproducer with which I can test this? Seems a bit like a corner-case to me (at least I don't know of any application with which I would encounter this bug), but fix-worthy nevertheless!
Comment 3 Christian Hesse 2016-07-11 22:47:08 CEST
My first comment has a minimal example with explanation.
Does that help or should I prepare source for a complete demo application?
Comment 4 Christian Hesse 2016-07-11 22:52:45 CEST
Created attachment 6731 
demo code

Looks like I never tested my demo code... It does not even compile.
Fixed all issues (still no error handling, though), please test with demo.c. The explanation still applies.
Comment 5 Simon Steinbeiss editbugs 2016-07-12 00:25:43 CEST
Thanks for the patch and the demo code. I've tested it and reproduced the problem as well as the fix.

I amended one line in your patch though, which wasn't correct:
gtk_widget_set_opacity(GTK_WIDGET(window), window->normal_opacity);
instead of:
gtk_window_set_opacity(GTK_WINDOW(window), 1.0);

First of all gtk_window_set_opacity has been deprecated a while ago (Gtk3.8) and secondly it's better to reset to the opacity that all notifications have, not just a hardcoded value of 1.0.


Thanks again, fix pushed to master!

Bug #11858

Reported by:
Christian Hesse
Reported on: 2015-04-27
Last modified on: 2016-07-12

People

Assignee:
Jérôme Guelfucci
CC List:
2 users

Version

Attachments

on update reset fade as well (1.14 KB, patch)
2015-04-27 01:39 CEST , Christian Hesse
no flags
on update reset fade as well (1.14 KB, patch)
2016-07-04 20:10 CEST , Christian Hesse
no flags
demo code (751 bytes, patch)
2016-07-11 22:52 CEST , Christian Hesse
no flags

Additional information