Jan Djärv<address@hidden> writes:
We should have a general way to add file descriptors and get a
callback for them. In the mean time, do something like this in
process.c:
static SELECT_TYPE dbus_mask;
void
add_dbus_fd (int fd)
{
FD_SET (fd,&dbus_mask);
add_keyboard_wait_descriptor (fd);
}
void
remove_dbus_fd (int fd)
{
FD_CLR (fd,&dbus_mask);
remove_keyboard_wait_descriptor (fd);
}
After this wait_reading_process_output
/* Check for data from a process. */
if (no_avail || nfds == 0)
continue;
add
for (channel = 0; channel<= max_keyboard_desc; ++channel)
if (FD_ISSET (channel,&dbus_mask)&& FD_ISSET (channel,&Available))
{
xd_read_queued_messages ();
break; /* All dbus channels has been read, exit loop */
}
and in init_process:
FD_ZERO (&dbus_mask);
Use remove_dbus_fd and add_dbus_fd in dbusbind.c.
But maybe I'll add that general input mechanism instead, well see.
I have added this, and it works fine in an X11 environment. I guess,
redisplay() does the job.
If I test it in a non-X11 terminal, arriving D-Bus messages are
recognised only after pressing a character on the keyboard. So at least
an additional trigger is missing to handle this event in time.