* Re: master 4fb028be6c 3/3: Fix releasing the mouse on top of the tool bar on MS Windows
@ 2022-04-30 7:17 Eli Zaretskii
2022-04-30 7:50 ` Po Lu
0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2022-04-30 7:17 UTC (permalink / raw)
To: Po Lu; +Cc: emacs-devel
> branch: master
> commit 4fb028be6c2de5a556f56bb40a3f948a143cef37
> Author: Po Lu <luangruo@yahoo.com>
> Commit: Po Lu <luangruo@yahoo.com>
>
> Fix releasing the mouse on top of the tool bar on MS Windows
>
> * src/w32term.c (w32_read_socket): Don't handle tool bar clicks
> specially for button up events if no tool bar item was
> previously pressed.
> ---
> src/w32term.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/w32term.c b/src/w32term.c
> index 1937f94645..205ac74966 100644
> --- a/src/w32term.c
> +++ b/src/w32term.c
> @@ -5365,7 +5365,9 @@ w32_read_socket (struct terminal *terminal,
>
> window = window_from_coordinates (f, x, y, 0, 1, 1);
>
> - if (EQ (window, f->tool_bar_window))
> + if (EQ (window, f->tool_bar_window)
> + && (inev.modifiers & down_modifier
> + || f->last_tool_bar_item != -1))
> {
> w32_handle_tool_bar_click (f, &inev);
> tool_bar_p = 1;
>
Can you tell what was the problem, and how to see it happening before
the change?
Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: master 4fb028be6c 3/3: Fix releasing the mouse on top of the tool bar on MS Windows
2022-04-30 7:17 master 4fb028be6c 3/3: Fix releasing the mouse on top of the tool bar on MS Windows Eli Zaretskii
@ 2022-04-30 7:50 ` Po Lu
2022-04-30 9:36 ` Eli Zaretskii
0 siblings, 1 reply; 3+ messages in thread
From: Po Lu @ 2022-04-30 7:50 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
Eli Zaretskii <eliz@gnu.org> writes:
>> window = window_from_coordinates (f, x, y, 0, 1, 1);
>>
>> - if (EQ (window, f->tool_bar_window))
>> + if (EQ (window, f->tool_bar_window)
>> + && (inev.modifiers & down_modifier
>> + || f->last_tool_bar_item != -1))
>> {
>> w32_handle_tool_bar_click (f, &inev);
>> tool_bar_p = 1;
>>
>
> Can you tell what was the problem, and how to see it happening before
> the change?
>
> Thanks.
Begin dragging to select some text but release the mouse pointer on top
of the toolbar. Emacs will continue selecting text until you click
somewhere else, because the button release event is consumed by the tool
bar and never reaches Lisp.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: master 4fb028be6c 3/3: Fix releasing the mouse on top of the tool bar on MS Windows
2022-04-30 7:50 ` Po Lu
@ 2022-04-30 9:36 ` Eli Zaretskii
0 siblings, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2022-04-30 9:36 UTC (permalink / raw)
To: Po Lu; +Cc: emacs-devel
> From: Po Lu <luangruo@yahoo.com>
> Cc: emacs-devel@gnu.org
> Date: Sat, 30 Apr 2022 15:50:53 +0800
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> >> window = window_from_coordinates (f, x, y, 0, 1, 1);
> >>
> >> - if (EQ (window, f->tool_bar_window))
> >> + if (EQ (window, f->tool_bar_window)
> >> + && (inev.modifiers & down_modifier
> >> + || f->last_tool_bar_item != -1))
> >> {
> >> w32_handle_tool_bar_click (f, &inev);
> >> tool_bar_p = 1;
> >>
> >
> > Can you tell what was the problem, and how to see it happening before
> > the change?
> >
> > Thanks.
>
> Begin dragging to select some text but release the mouse pointer on top
> of the toolbar. Emacs will continue selecting text until you click
> somewhere else, because the button release event is consumed by the tool
> bar and never reaches Lisp.
Thanks.
For the future, please make a point of describing such situations in
the comments, they are invaluable when making changes in the relevant
code, especially if the change isn't related to any bug, so there's no
discussion to read and no recipes to try.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-04-30 9:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-30 7:17 master 4fb028be6c 3/3: Fix releasing the mouse on top of the tool bar on MS Windows Eli Zaretskii
2022-04-30 7:50 ` Po Lu
2022-04-30 9:36 ` Eli Zaretskii
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).