emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r116545: Fix event race


From: Daniel Colascione
Subject: [Emacs-diffs] trunk r116545: Fix event race
Date: Mon, 24 Feb 2014 14:28:00 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 116545 [merge]
revision-id: address@hidden
parent: address@hidden
parent: address@hidden
committer: Daniel Colascione <address@hidden>
branch nick: trunk
timestamp: Mon 2014-02-24 06:27:37 -0800
message:
  Fix event race
modified:
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/keyboard.c                 keyboard.c-20091113204419-o5vbwnq5f7feedwu-449
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2014-02-22 21:49:10 +0000
+++ b/src/ChangeLog     2014-02-24 14:27:37 +0000
@@ -1,3 +1,7 @@
+2014-02-24  Daniel Colascione  <address@hidden>
+
+       * keyboard.c (read_char): Close race that resulted in lost events.
+
 2014-02-22  Glenn Morris  <address@hidden>
 
        * frame.c (frame-alpha-lower-limit, frame-resize-pixelwise):

=== modified file 'src/keyboard.c'
--- a/src/keyboard.c    2014-02-08 04:02:16 +0000
+++ b/src/keyboard.c    2014-02-24 14:26:49 +0000
@@ -2891,8 +2891,12 @@
     {
       c = read_decoded_event_from_main_queue (end_time, local_getcjmp,
                                               prev_event, used_mouse_menu);
-      if (end_time && timespec_cmp (*end_time, current_timespec ()) <= 0)
-        goto exit;
+      if (NILP(c) && end_time &&
+          timespec_cmp (*end_time, current_timespec ()) <= 0)
+        {
+          goto exit;
+        }
+
       if (EQ (c, make_number (-2)))
         {
          /* This is going to exit from read_char


reply via email to

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