From 7b7a124afa0a71f4847ddc5a3934b02ab5d46d2c Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 30 Apr 2022 12:35:48 +0300 Subject: [PATCH] ; * src/w32term.c (w32_read_socket): Add comment for recent change. --- src/w32term.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/w32term.c b/src/w32term.c index 8a98d2f1c67..0c16dc1eef4 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -5423,6 +5423,15 @@ w32_read_socket (struct terminal *terminal, window = window_from_coordinates (f, x, y, 0, 1, 1); if (EQ (window, f->tool_bar_window) + /* Make sure the tool bar was previously + pressed, otherwise an event that started + outside of the tool bar will not be handled + correctly when the mouse button is + released. For example, start dragging to + select some buffer text, drag the mouse to + the tool bar, and release the mouse button + -- this should not consider the release + event as a tool-bar click. */ && (inev.modifiers & down_modifier || f->last_tool_bar_item != -1)) { -- 2.39.2