]> git.eshelyaron.com Git - emacs.git/commitdiff
Ignore XdndPosition events triggered by the wrong mouse button
authorPo Lu <luangruo@yahoo.com>
Thu, 14 Apr 2022 02:26:39 +0000 (10:26 +0800)
committerPo Lu <luangruo@yahoo.com>
Thu, 14 Apr 2022 02:26:39 +0000 (10:26 +0800)
* src/xterm.c (x_dnd_send_position): Don't send if button is set
but not a scroll wheel button.

src/xterm.c

index aad772c4236a1c282655273922befff804f1a712..367659d3c1c8ecc8b2a5f1ec1b3aac6fa029b562 100644 (file)
@@ -3389,6 +3389,8 @@ x_dnd_send_position (struct frame *f, Window target, int supported,
          msg.xclient.data.l[1] |= (1 << 9);
          msg.xclient.data.l[1] |= (button - 4) << 7;
        }
+      else if (button)
+       return;
 
       msg.xclient.data.l[1] |= state & 0x3f;
     }