[Xfce4-commits] <xfce4-notifyd:master> Reset the timeout when querying server information.

Jérôme Guelfucci noreply at xfce.org
Sun Feb 27 18:10:01 CET 2011


Updating branch refs/heads/master
         to 5e7a39162babd9a7618d1be7c835b1e58756fab7 (commit)
       from f33ab34ac046adc76e12790a89a56d3f881a66a3 (commit)

commit 5e7a39162babd9a7618d1be7c835b1e58756fab7
Author: Jérôme Guelfucci <jeromeg at xfce.org>
Date:   Sun Feb 27 18:07:31 2011 +0100

    Reset the timeout when querying server information.

 xfce4-notifyd/xfce-notify-daemon.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/xfce4-notifyd/xfce-notify-daemon.c b/xfce4-notifyd/xfce-notify-daemon.c
index 999214f..0d6eddd 100644
--- a/xfce4-notifyd/xfce-notify-daemon.c
+++ b/xfce4-notifyd/xfce-notify-daemon.c
@@ -990,6 +990,14 @@ notify_get_server_information(XfceNotifyDaemon *xndaemon,
     *OUT_spec_version = g_strdup(NOTIFICATIONS_SPEC_VERSION);
 #endif
 
+    /* Set a timeout to close xfce4-notifyd if it is idle for 10 minutes */
+    if(xndaemon->close_timeout)
+        g_source_remove(xndaemon->close_timeout);
+
+    xndaemon->close_timeout =
+        g_timeout_add_seconds(600, (GSourceFunc) xfce_notify_daemon_close_timeout,
+                              xndaemon);
+
     return TRUE;
 }
 



More information about the Xfce4-commits mailing list