emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reading D-Bus messages


From: Ken Brown
Subject: Re: Reading D-Bus messages
Date: Mon, 27 Sep 2010 22:47:34 -0400
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.9) Gecko/20100825 Thunderbird/3.1.3

On 9/27/2010 5:23 PM, Michael Albinus wrote:
Ken Brown<address@hidden>  writes:

To finish off the Cygwin issue that started this thread, dbus now
works fine in emacs-24 under Cygwin, but not in emacs-23.  Would
anyone object if I were to apply the following patch to the emacs-23
branch to fix the (Cygwin-specific) problem there?

=== modified file 'src/keyboard.c'
--- src/keyboard.c      2010-07-05 17:16:59 +0000
+++ src/keyboard.c      2010-09-27 19:33:05 +0000
@@ -4107,7 +4107,7 @@
          interrupt handlers have not read it, read it now.  */

  /* Note SIGIO has been undef'd if FIONREAD is missing.  */
-#ifdef SIGIO
+#if defined (SIGIO) || defined (CYGWIN)
        gobble_input (0);
  #endif /* SIGIO */
        if (kbd_fetch_ptr != kbd_store_ptr)

Likely it is sufficient to move the call of xd_read_queued_messages out
of gobble_input:

  --8<---------------cut here---------------start------------->8---
*** ~/src/emacs-23/src/keyboard.c.~100064~      2010-09-27 23:18:30.840864838 
+0200
--- ~/src/emacs-23/src/keyboard.c       2010-09-27 23:18:01.942112064 +0200
***************
*** 4106,4111 ****
--- 4106,4116 ----
         /* One way or another, wait until input is available; then, if
         interrupt handlers have not read it, read it now.  */

+ #ifdef HAVE_DBUS
+       /* Read D-Bus messages.  */
+       xd_read_queued_messages ();
+ #endif /* HAVE_DBUS */
+
   /* Note SIGIO has been undef'd if FIONREAD is missing.  */
   #ifdef SIGIO
         gobble_input (0);
***************
*** 7051,7061 ****
   gobble_input (expected)
        int expected;
   {
- #ifdef HAVE_DBUS
-   /* Read D-Bus messages.  */
-   xd_read_queued_messages ();
- #endif /* HAVE_DBUS */
-
   #ifdef SIGIO
     if (interrupt_input)
       {
--- 7056,7061 ----
--8<---------------cut here---------------end--------------->8---

This works for me. Maybe you should test it too when you get a chance and then check it in if you're satisfied.

Ken



reply via email to

[Prev in Thread] Current Thread [Next in Thread]