From: Po Lu Date: Fri, 15 Jul 2022 02:30:18 +0000 (+0800) Subject: Fix sending button presses if the drop target specified a mouse rectangle X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~16^2~1886^2~925 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=2e0c76e397811837fd119c1298a5606b4ef65be5;p=emacs.git Fix sending button presses if the drop target specified a mouse rectangle * src/xterm.c (x_dnd_send_position): Handle button presses specially, ignoring mouse rectangles. --- diff --git a/src/xterm.c b/src/xterm.c index 94fb0bfa1a0..63b625f3837 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -4455,7 +4455,10 @@ x_dnd_send_position (struct frame *f, Window target, int supported, if (target == x_dnd_mouse_rect_target && x_dnd_mouse_rect.width - && x_dnd_mouse_rect.height) + && x_dnd_mouse_rect.height + /* Ignore the mouse rectangle if we're supposed to be sending a + button press instead. */ + && (supported < 5 || !button)) { if (root_x >= x_dnd_mouse_rect.x && root_x < (x_dnd_mouse_rect.x