]> git.eshelyaron.com Git - emacs.git/commitdiff
* dbusbind.c (xd_initialize): Add connection file descriptor to
authorMichael Albinus <michael.albinus@gmx.de>
Sun, 16 Aug 2009 12:23:23 +0000 (12:23 +0000)
committerMichael Albinus <michael.albinus@gmx.de>
Sun, 16 Aug 2009 12:23:23 +0000 (12:23 +0000)
input_wait_mask, in order to let select() detect, whether a new
message has been arrived.

src/ChangeLog
src/dbusbind.c

index 12154bc0bb7506f5f7c5c9ae318f54db29e468be..d3d85a8502b4ca283dbaa700886fdfa5562c82ad 100644 (file)
@@ -1,3 +1,9 @@
+2009-08-16  Michael Albinus  <michael.albinus@gmx.de>
+
+       * 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.
+
 2009-08-15  Michael Albinus  <michael.albinus@gmx.de>
 
        * dbusbind.c (xd_get_dispatch_status, xd_pending_messages): New
index aa4efa7ca33d8f330e005e3bf8a717eb1a0feaf9..cde4dba3a235e65365e98508c8f54cac7e69a4ca 100644 (file)
@@ -696,6 +696,7 @@ xd_initialize (bus)
 {
   DBusConnection *connection;
   DBusError derror;
+  int fd;
 
   /* Parameter check.  */
   CHECK_SYMBOL (bus);
@@ -716,6 +717,11 @@ xd_initialize (bus)
   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);