aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/keyboard.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index ea0f10bd110..fca3d3a1599 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -2142,8 +2142,12 @@ kbd_buffer_get_event ()
2142 if (event->kind == selection_request_event) 2142 if (event->kind == selection_request_event)
2143 { 2143 {
2144#ifdef HAVE_X11 2144#ifdef HAVE_X11
2145 x_handle_selection_request (event); 2145 struct input_event copy = *event;
2146 /* Remove it from the buffer before processing it,
2147 since otherwise swallow_events will see it
2148 and process it again. */
2146 perd->kbd_fetch_ptr = event + 1; 2149 perd->kbd_fetch_ptr = event + 1;
2150 x_handle_selection_request (&copy);
2147#else 2151#else
2148 /* We're getting selection request events, but we don't have 2152 /* We're getting selection request events, but we don't have
2149 a window system. */ 2153 a window system. */
@@ -2319,8 +2323,10 @@ swallow_events ()
2319 if (event->kind == selection_request_event) 2323 if (event->kind == selection_request_event)
2320 { 2324 {
2321#ifdef HAVE_X11 2325#ifdef HAVE_X11
2322 x_handle_selection_request (event); 2326 struct input_event copy;
2327 copy = *event;
2323 perd->kbd_fetch_ptr = event + 1; 2328 perd->kbd_fetch_ptr = event + 1;
2329 x_handle_selection_request (&copy);
2324#else 2330#else
2325 /* We're getting selection request events, but we don't have 2331 /* We're getting selection request events, but we don't have
2326 a window system. */ 2332 a window system. */