From b65735970b256a901649699d81ea1cf2f350d003 Mon Sep 17 00:00:00 2001 From: Sascha Kruse Date: Mon, 3 Oct 2011 12:47:17 +0200 Subject: [PATCH] fix hang of pidgin on close pidgin (and probably some other applications too) send closeNotification to the server to close all open notifications and waits for a reply. Send dummy reply for now to make them happy. --- dunst_dbus.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dunst_dbus.c b/dunst_dbus.c index 8a81403..0cde026 100644 --- a/dunst_dbus.c +++ b/dunst_dbus.c @@ -108,7 +108,13 @@ getCapabilities(DBusMessage *dmsg) { void closeNotification(DBusMessage *dmsg) { - fprintf(stderr, "closeNotification to be implemented\n"); + DBusMessage *reply; + reply = dbus_message_new_method_return(dmsg); + if(!reply) { + return; + } + dbus_connection_send(dbus_conn, reply, &dbus_serial); + dbus_connection_flush(dbus_conn); } void @@ -250,5 +256,6 @@ notify(DBusMessage *dmsg) { dbus_message_iter_init_append(reply, &args); dbus_message_iter_append_basic(&args, DBUS_TYPE_UINT32, &id); dbus_connection_send(dbus_conn, reply, &dbus_serial); + dbus_message_unref(reply); }