1
0
Эх сурвалжийг харах

x11: Set correct clipboard target type in `SelectionRequest` handling

(cherry picked from commit 5fe010270ab56a2bfa2933ffc7a13cfc1fc78c71)
Guldoman 6 сар өмнө
parent
commit
e1e38e2250

+ 2 - 1
src/video/x11/SDL_x11events.c

@@ -676,9 +676,10 @@ static void X11_HandleClipboardEvent(_THIS, const XEvent *xevent)
                                            &overflow, &seln_data) == Success) {
                     if (seln_format != None) {
                         X11_XChangeProperty(display, req->requestor, req->property,
-                                            sevent.xselection.target, seln_format, PropModeReplace,
+                                            req->target, 8, PropModeReplace,
                                             seln_data, nbytes);
                         sevent.xselection.property = req->property;
+                        sevent.xselection.target = req->target;
                         X11_XFree(seln_data);
                         break;
                     } else {