diff src/dbusbind.c @ 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 4eb010135586
children 52ea0b8b565e
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);