From c10024911d6c225645c22e87a7326c13c0116ac6 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Thu, 14 Apr 2022 10:26:39 +0800 Subject: [PATCH] Ignore XdndPosition events triggered by the wrong mouse button * src/xterm.c (x_dnd_send_position): Don't send if button is set but not a scroll wheel button. --- src/xterm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/xterm.c b/src/xterm.c index aad772c4236..367659d3c1c 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -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; } -- 2.39.5