]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix sending button presses if the drop target specified a mouse rectangle
authorPo Lu <luangruo@yahoo.com>
Fri, 15 Jul 2022 02:30:18 +0000 (10:30 +0800)
committerPo Lu <luangruo@yahoo.com>
Fri, 15 Jul 2022 02:30:18 +0000 (10:30 +0800)
* src/xterm.c (x_dnd_send_position): Handle button presses
specially, ignoring mouse rectangles.

src/xterm.c

index 94fb0bfa1a02ecf02d46c6a7f7209117f01129bf..63b625f3837a946a77e5b6753cb26815fe079689 100644 (file)
@@ -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