changeset 104296:a98c5e3801f8

* dbusbind.c (xd_initialize): Add connection file descriptor to input_wait_mask, in order to let select() detect, whether a new message has been arrived.
author Michael Albinus <michael.albinus@gmx.de>
date Sun, 16 Aug 2009 12:22:32 +0000
parents f03494acbd1b
children f3695109ab95
files src/dbusbind.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/dbusbind.c	Sun Aug 16 05:49:26 2009 +0000
+++ b/src/dbusbind.c	Sun Aug 16 12:22:32 2009 +0000
@@ -696,6 +696,7 @@
 {
   DBusConnection *connection;
   DBusError derror;
+  int fd;
 
   /* Parameter check.  */
   CHECK_SYMBOL (bus);
@@ -716,6 +717,11 @@
   if (connection == NULL)
     XD_SIGNAL2 (build_string ("No connection"), bus);
 
+  /* Add connection file descriptor to input_wait_mask, in order to
+     let select() detect, whether a new message has been arrived.  */
+  if (dbus_connection_get_unix_fd (connection, &fd))
+    add_keyboard_wait_descriptor (fd);
+
   /* Cleanup.  */
   dbus_error_free (&derror);