Bug 228743 - NotificationClosed dbus message is not sent when the notification window is closed
Summary: NotificationClosed dbus message is not sent when the notification window is c...
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: knotify (show other bugs)
Version: 4.4
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Olivier Goffart
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-27 13:38 UTC by Nils Kneuper
Modified: 2010-03-02 18:24 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nils Kneuper 2010-02-27 13:38:35 UTC
Version:            (using KDE 4.4.0)
Compiler:          gcc (Gentoo 4.4.3 p1.0) amd64 
OS:                Linux
Installed from:    Gentoo Packages

When sending messages following the freedesktop notifications protocol (that is finally supported with KDE 4.4.0) there is still the old problem from previous KDE4 versions left that the NotificationClosed messages are not sent.
This issue seems to have been fixed in colibri 0.1.1 and I hope to see this issue fixed in 4.4.1.

As reference regarding the hack we had to use at Wesnoth:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game_display.cpp?rev=41401&dir_pagestart=50&view=markup
In this file, look for the variable "kde_style". Most of those usages are obsolete with kde 4.4 (and only left for compatibilities sake with kde <=4.3.x). That is only line 1153 is still required due to the bug this report is about:
	// TODO: remove once closing signals for KDE are handled in filter_dbus_signal.
	if (kde_style) return 0;

If you have a tarball of the last development release (Wesnoth 1.7.13) you have to apply this svn diff ( http://svn.gna.org/viewcvs/wesnoth/trunk/src/game_display.cpp?r2=41401&rev=41401&r1=41190&dir_pagestart=50 ) or you will only get error messages due to the "non freedesktop notification spec" kde <=4.3.x behavior. In 1.7.14 (planned "soon") no hack should be required. To test for the bug:
Start a multiplayer game with the correctly changed version (has to be multiplayer, there are only notifications in MP), start a game, eg on a 4 player map against 3 ai opponents, quit your turn, switch to a different prog (so that the wesnoth window loses its focus), see that a notification is shown when the next players turn starts while the prog is not focused. Once the notification window closes you won't see additional notifications.
Expected behavior: Wesnoth should be notified about the notification window being closed by using a NotificationClosed dbus message and thus a new window should be opened. Regarding the changelog this was fixed in colibri 0.1.1, released on 2010.02.16.
Comment 1 Marco Martin 2010-03-02 10:48:01 UTC
SVN commit 1097875 by mart:

forward the userdeleted operation also when the notfication gets deleted
CCBUG:228743


 M  +4 -0      dbusnotificationprotocol.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1097875
Comment 2 Marco Martin 2010-03-02 10:52:02 UTC
SVN commit 1097876 by mart:

backport userClosed forwarding on notification deletion

BUG:228743


 M  +4 -0      dbusnotificationprotocol.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1097876
Comment 3 Marco Martin 2010-03-02 10:52:35 UTC
should be fixed now, please test if there are still problems :)
Comment 4 Marco Martin 2010-03-02 17:48:24 UTC
SVN commit 1098007 by mart:

show the stack again if one of its old notifications changed
CCBUG:228743


 M  +1 -0      notifications.cpp  
 M  +12 -0     notificationstack.cpp  
 M  +2 -0      notificationstack.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1098007
Comment 5 Marco Martin 2010-03-02 18:24:29 UTC
SVN commit 1098020 by mart:

final solution, that is way uglier than the solution in 4.5, due to the old architecture
CCBUG:228743


 M  +6 -0      core/notification.cpp  
 M  +1 -0      core/notification.h  
 M  +25 -0     ui/applet.cpp  
 M  +1 -0      ui/applet.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1098020