Hi,
I'm trying to make Emacs' D-Bus bindings running also in a cygwin
environment. Synchronous D-Bus messages are handled fine.
The problem is reading asynchronous messages. dbusbind.c offers two
functions: xd_pending_messages (called in readable_events), which
returns TRUE when there are D-Bus messages to be read, and
xd_read_queued_messages (called in gobble_input), which reads the
message(s). That works OK on GNU/Linux (and other systems, I haven't
tested myself).
With cygwin, after the first time a D-Bus message has arrived, and
xd_pending_messages has returned TRUE, Emacs is blocked. According to
the traces, xd_pending_messages is called again and again, and
xd_pending_messages isn't called ever.
I do not understand all details of keyboard.c. Is there something I need
to set in order to urge the call of xd_read_queued_messages (via
gobble_input)? Or do I need to suppress further polling? What is the
difference for Emacs running with cygwin, compared with the GNU/Linux case?
Btw, when I call xd_read_queued_messages inside xd_pending_messages,
everything works fine also with cygwin. But I guess this isn't the
correct solution.