emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r99347: * xterm.c (event_handler_gdk)


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r99347: * xterm.c (event_handler_gdk): Block input (Bug#5037).
Date: Sat, 16 Jan 2010 15:20:32 -0500
User-agent: Bazaar (2.0.2)

------------------------------------------------------------
revno: 99347
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Sat 2010-01-16 15:20:32 -0500
message:
  * xterm.c (event_handler_gdk): Block input (Bug#5037).
modified:
  src/ChangeLog
  src/xterm.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2010-01-16 19:28:59 +0000
+++ b/src/ChangeLog     2010-01-16 20:20:32 +0000
@@ -1,3 +1,7 @@
+2010-01-16  Stefan Monnier  <address@hidden>
+
+       * xterm.c (event_handler_gdk): Block input (Bug#5037).
+
 2010-01-16  Chong Yidong  <address@hidden>
 
        * emacs.c (standard_args): Adjust arg priorities to reflect how

=== modified file 'src/xterm.c'
--- a/src/xterm.c       2010-01-16 04:49:37 +0000
+++ b/src/xterm.c       2010-01-16 20:20:32 +0000
@@ -5797,6 +5797,7 @@
 {
   XEvent *xev = (XEvent *) gxev;
 
+  BLOCK_INPUT;
   if (current_count >= 0)
     {
       struct x_display_info *dpyinfo;
@@ -5807,23 +5808,27 @@
       /* Filter events for the current X input method.
          GTK calls XFilterEvent but not for key press and release,
          so we do it here.  */
-      if (xev->type == KeyPress || xev->type == KeyRelease)
-        if (dpyinfo && x_filter_event (dpyinfo, xev))
-          return GDK_FILTER_REMOVE;
+      if ((xev->type == KeyPress || xev->type == KeyRelease)
+         && dpyinfo
+         && x_filter_event (dpyinfo, xev))
+       {
+         UNBLOCK_INPUT;
+         return GDK_FILTER_REMOVE;
+       }
 #endif
 
       if (! dpyinfo)
         current_finish = X_EVENT_NORMAL;
       else
-       {
-         current_count +=
-           handle_one_xevent (dpyinfo, xev, &current_finish,
-                              current_hold_quit);
-       }
+       current_count +=
+         handle_one_xevent (dpyinfo, xev, &current_finish,
+                            current_hold_quit);
     }
   else
     current_finish = x_dispatch_event (xev, xev->xany.display);
 
+  UNBLOCK_INPUT;
+
   if (current_finish == X_EVENT_GOTO_OUT || current_finish == X_EVENT_DROP)
     return GDK_FILTER_REMOVE;
 


reply via email to

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