]> git.eshelyaron.com Git - emacs.git/commitdiff
(kbd_buffer_get_event, swallow_events): Remove selection_request event
authorRichard M. Stallman <rms@gnu.org>
Thu, 2 Feb 1995 18:55:39 +0000 (18:55 +0000)
committerRichard M. Stallman <rms@gnu.org>
Thu, 2 Feb 1995 18:55:39 +0000 (18:55 +0000)
from input queue before processing it.

src/keyboard.c

index ea0f10bd1106a4970a3aaa55facdcc61d6e4fab2..fca3d3a15990093eb8d2b1a1c625b5bae0466ed1 100644 (file)
@@ -2142,8 +2142,12 @@ kbd_buffer_get_event ()
       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 @@ swallow_events ()
       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.  */