[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r106620: Handle X selection requests
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r106620: Handle X selection requests in input-pending-p. |
Date: |
Mon, 05 Dec 2011 23:21:48 +0800 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 106620
fixes bug(s): http://debbugs.gnu.org/10195
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Mon 2011-12-05 23:21:48 +0800
message:
Handle X selection requests in input-pending-p.
* src/keyboard.c (process_special_events): New function.
(swallow_events, Finput_pending_p): Use it.
modified:
src/ChangeLog
src/keyboard.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2011-12-05 09:05:10 +0000
+++ b/src/ChangeLog 2011-12-05 15:21:48 +0000
@@ -1,3 +1,8 @@
+2011-12-05 Chong Yidong <address@hidden>
+
+ * keyboard.c (process_special_events): New function.
+ (swallow_events, Finput_pending_p): Use it (Bug#10195).
+
2011-12-05 Paul Eggert <address@hidden>
* coding.c (encode_designation_at_bol): Don't use uninitialized
=== modified file 'src/keyboard.c'
--- a/src/keyboard.c 2011-12-04 09:26:30 +0000
+++ b/src/keyboard.c 2011-12-05 15:21:48 +0000
@@ -465,6 +465,7 @@
Lisp_Object);
static void handle_interrupt (void);
static void quit_throw_to_read_char (int) NO_RETURN;
+static void process_special_events (void);
static void timer_start_idle (void);
static void timer_stop_idle (void);
static void timer_resume_idle (void);
@@ -4145,14 +4146,12 @@
return (obj);
}
-/* Process any events that are not user-visible,
- then return, without reading any user-visible events. */
+/* Process any non-user-visible events (currently X selection events),
+ without reading any user-visible events. */
-void
-swallow_events (int do_display)
+static void
+process_special_events (void)
{
- int old_timers_run;
-
while (kbd_fetch_ptr != kbd_store_ptr)
{
struct input_event *event;
@@ -4187,6 +4186,17 @@
else
break;
}
+}
+
+/* Process any events that are not user-visible, run timer events that
+ are ripe, and return, without reading any user-visible events. */
+
+void
+swallow_events (int do_display)
+{
+ int old_timers_run;
+
+ process_special_events ();
old_timers_run = timers_run;
get_input_pending (&input_pending, READABLE_EVENTS_DO_TIMERS_NOW);
@@ -10522,6 +10532,9 @@
|| !NILP (Vunread_input_method_events))
return (Qt);
+ /* Process non-user-visible events (Bug#10195). */
+ process_special_events ();
+
get_input_pending (&input_pending,
READABLE_EVENTS_DO_TIMERS_NOW
| READABLE_EVENTS_FILTER_EVENTS);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r106620: Handle X selection requests in input-pending-p.,
Chong Yidong <=