diff options
| author | Eli Zaretskii | 2022-06-10 16:13:56 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2022-06-10 16:13:56 +0300 |
| commit | ac1d45c5ea8041284021ebdd8cf4609c92b83608 (patch) | |
| tree | 07e34350843db4c82fc50f289f9d81555fef326f /src | |
| parent | 89e6305b17b9f3c9aeebb02e178b7d7635ec2156 (diff) | |
| parent | f7307f6215d76581a1afb102cfcd2343ea243acd (diff) | |
| download | emacs-ac1d45c5ea8041284021ebdd8cf4609c92b83608.tar.gz emacs-ac1d45c5ea8041284021ebdd8cf4609c92b83608.zip | |
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.c | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/src/xterm.c b/src/xterm.c index 375b345a90a..30322b0c09b 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -3443,7 +3443,6 @@ x_dnd_do_unsupported_drop (struct x_display_info *dpyinfo, | |||
| 3443 | int dest_x, dest_y; | 3443 | int dest_x, dest_y; |
| 3444 | Window child_return, child; | 3444 | Window child_return, child; |
| 3445 | 3445 | ||
| 3446 | event.xbutton.type = ButtonPress; | ||
| 3447 | event.xbutton.serial = 0; | 3446 | event.xbutton.serial = 0; |
| 3448 | event.xbutton.send_event = True; | 3447 | event.xbutton.send_event = True; |
| 3449 | event.xbutton.display = dpyinfo->display; | 3448 | event.xbutton.display = dpyinfo->display; |
| @@ -3457,39 +3456,37 @@ x_dnd_do_unsupported_drop (struct x_display_info *dpyinfo, | |||
| 3457 | dest_x = root_x; | 3456 | dest_x = root_x; |
| 3458 | dest_y = root_y; | 3457 | dest_y = root_y; |
| 3459 | 3458 | ||
| 3460 | while (XTranslateCoordinates (dpyinfo->display, child, | 3459 | while (XTranslateCoordinates (dpyinfo->display, dpyinfo->root_window, |
| 3461 | child, root_x, root_y, &dest_x, | 3460 | child, root_x, root_y, &dest_x, &dest_y, |
| 3462 | &dest_y, &child_return) | 3461 | &child_return) |
| 3463 | && child_return != None | 3462 | && child_return != None) |
| 3464 | && XTranslateCoordinates (dpyinfo->display, child, | 3463 | child = child_return; |
| 3465 | child_return, root_x, root_y, | ||
| 3466 | &dest_x, &dest_y, &child)) | ||
| 3467 | { | ||
| 3468 | child = child_return; | ||
| 3469 | root_x = dest_x; | ||
| 3470 | root_y = dest_y; | ||
| 3471 | } | ||
| 3472 | 3464 | ||
| 3473 | if (CONSP (value)) | 3465 | if (CONSP (value)) |
| 3474 | x_own_selection (QPRIMARY, Fnth (make_fixnum (1), value), | 3466 | x_own_selection (QPRIMARY, Fnth (make_fixnum (1), value), |
| 3475 | frame); | 3467 | frame); |
| 3476 | else | 3468 | else |
| 3477 | x_own_selection (QPRIMARY, Qnil, frame); | 3469 | error ("Lost ownership of XdndSelection"); |
| 3478 | 3470 | ||
| 3479 | event.xbutton.window = child; | 3471 | event.xbutton.window = child; |
| 3472 | event.xbutton.subwindow = None; | ||
| 3480 | event.xbutton.x = dest_x; | 3473 | event.xbutton.x = dest_x; |
| 3481 | event.xbutton.y = dest_y; | 3474 | event.xbutton.y = dest_y; |
| 3482 | event.xbutton.state = 0; | 3475 | event.xbutton.state = 0; |
| 3483 | event.xbutton.button = 2; | 3476 | event.xbutton.button = 2; |
| 3484 | event.xbutton.same_screen = True; | 3477 | event.xbutton.same_screen = True; |
| 3485 | event.xbutton.time = before + 1; | ||
| 3486 | event.xbutton.time = before + 2; | ||
| 3487 | 3478 | ||
| 3488 | x_set_pending_dnd_time (before); | 3479 | x_set_pending_dnd_time (before); |
| 3489 | 3480 | ||
| 3481 | event.xbutton.type = ButtonPress; | ||
| 3482 | event.xbutton.time = before + 1; | ||
| 3483 | |||
| 3490 | XSendEvent (dpyinfo->display, child, | 3484 | XSendEvent (dpyinfo->display, child, |
| 3491 | True, ButtonPressMask, &event); | 3485 | True, ButtonPressMask, &event); |
| 3486 | |||
| 3492 | event.xbutton.type = ButtonRelease; | 3487 | event.xbutton.type = ButtonRelease; |
| 3488 | event.xbutton.time = before + 2; | ||
| 3489 | |||
| 3493 | XSendEvent (dpyinfo->display, child, | 3490 | XSendEvent (dpyinfo->display, child, |
| 3494 | True, ButtonReleaseMask, &event); | 3491 | True, ButtonReleaseMask, &event); |
| 3495 | 3492 | ||