summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2014-11-01 16:22:32 +0200
committerEli Zaretskii <eliz@gnu.org>2014-11-01 16:22:32 +0200
commit614beeecf29d16c08f66a4f82b6085be90df8a74 (patch)
tree3ae85ea2a061cbc7ba10030668c02292cbd6c0c0 /src
parent711066c8c14c8bd2b7ca88fda3d9847b6622b148 (diff)
Ignore BUFFER_SWITCH_EVENT events for the purposes of input-pending-p.
src/keyboard.c (readable_events): When FLAGS include READABLE_EVENTS_FILTER_EVENTS, ignore BUFFER_SWITCH_EVENT events. This avoids returning non-nil from input-pending-p when only such events are in the queue. Fixes: debbugs:18856
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog7
-rw-r--r--src/keyboard.c3
2 files changed, 9 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 0ddc2659512..d2cfa0dbfc3 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,10 @@
+2014-11-01 Eli Zaretskii <eliz@gnu.org>
+
+ * keyboard.c (readable_events): When FLAGS include
+ READABLE_EVENTS_FILTER_EVENTS, ignore BUFFER_SWITCH_EVENT events.
+ This avoids returning non-nil from input-pending-p when only such
+ events are in the queue. (Bug#18856)
+
2014-11-01 Jan Djärv <jan.h.d@swipnet.se>
* nsselect.m (QCLIPBOARD, QSECONDARY, QTEXT, QFILE_NAME)
diff --git a/src/keyboard.c b/src/keyboard.c
index 32d14ab0760..e16ee51ee0e 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -3495,7 +3495,8 @@ readable_events (int flags)
&& event->part == scroll_bar_handle
&& event->modifiers == 0)
#endif
- )
+ && !((flags & READABLE_EVENTS_FILTER_EVENTS)
+ && event->kind == BUFFER_SWITCH_EVENT))
return 1;
event++;
if (event == kbd_buffer + KBD_BUFFER_SIZE)