]> git.eshelyaron.com Git - emacs.git/commitdiff
; * src/w32term.c (w32_read_socket): Add comment for recent change.
authorEli Zaretskii <eliz@gnu.org>
Sat, 30 Apr 2022 09:35:48 +0000 (12:35 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 30 Apr 2022 09:35:48 +0000 (12:35 +0300)
src/w32term.c

index 8a98d2f1c6787d07f152f7cbaede3553502cddfd..0c16dc1eef4184b7f952062b0c028234d359803f 100644 (file)
@@ -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))
                       {