From a0645cddf04b22c60dd3291fe6f83c18958995ad Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sun, 16 Aug 2009 12:23:23 +0000 Subject: [PATCH] * 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. --- src/ChangeLog | 6 ++++++ src/dbusbind.c | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 12154bc0bb7..d3d85a8502b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2009-08-16 Michael Albinus + + * 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 * dbusbind.c (xd_get_dispatch_status, xd_pending_messages): New diff --git a/src/dbusbind.c b/src/dbusbind.c index aa4efa7ca33..cde4dba3a23 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c @@ -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); -- 2.39.2