changeset 10635:c807d6c947de

(kbd_buffer_get_event, swallow_events): Remove selection_request event from input queue before processing it.
author Richard M. Stallman <rms@gnu.org>
date Thu, 02 Feb 1995 18:55:39 +0000
parents de7beeb9f02c
children 6f9d0e697678
files src/keyboard.c
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/keyboard.c	Thu Feb 02 18:54:47 1995 +0000
+++ b/src/keyboard.c	Thu Feb 02 18:55:39 1995 +0000
@@ -2142,8 +2142,12 @@
       if (event->kind == selection_request_event)
 	{
 #ifdef HAVE_X11
-	  x_handle_selection_request (event);
+	  struct input_event copy = *event;
+	  /* Remove it from the buffer before processing it,
+	     since otherwise swallow_events will see it
+	     and process it again.  */
 	  perd->kbd_fetch_ptr = event + 1;
+	  x_handle_selection_request (&copy);
 #else
 	  /* We're getting selection request events, but we don't have
              a window system.  */
@@ -2319,8 +2323,10 @@
       if (event->kind == selection_request_event)
 	{
 #ifdef HAVE_X11
-	  x_handle_selection_request (event);
+	  struct input_event copy;
+	  copy = *event;
 	  perd->kbd_fetch_ptr = event + 1;
+	  x_handle_selection_request (&copy);
 #else
 	  /* We're getting selection request events, but we don't have
              a window system.  */