* Mouse click vs drag
@ 2020-09-22 15:57 Petteri Hintsanen
2020-09-22 16:24 ` Stefan Monnier
2020-09-22 16:38 ` Eli Zaretskii
0 siblings, 2 replies; 8+ messages in thread
From: Petteri Hintsanen @ 2020-09-22 15:57 UTC (permalink / raw)
To: help-gnu-emacs
Hello,
I have a high resolution ("4K") display and I’m struggling with mouse
clicks. They seem to get mixed up with mouse drag events. If I
understand mouse click logic correctly, button press + button release
events generate a click event only when the cursor is at the same screen
location during press and release. Otherwise it is a drag event.
Clicks are difficult to achieve with hires display, because the mouse
cursor tends to move a couple of pixels or so when pressing and
releasing mouse buttons. Eg. in Customize buffers it is difficult to
push "Apply" or "Apply and Save" buttons.
Is there some kind of fuzziness parameter to tune, like
double-click-fuzz? Would it make sense to have one?
Thanks,
Petteri
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Mouse click vs drag
2020-09-22 15:57 Mouse click vs drag Petteri Hintsanen
@ 2020-09-22 16:24 ` Stefan Monnier
2020-09-22 17:07 ` Eli Zaretskii
2020-09-22 16:38 ` Eli Zaretskii
1 sibling, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2020-09-22 16:24 UTC (permalink / raw)
To: help-gnu-emacs
> Clicks are difficult to achieve with hires display, because the mouse
> cursor tends to move a couple of pixels or so when pressing and
> releasing mouse buttons. Eg. in Customize buffers it is difficult to
> push "Apply" or "Apply and Save" buttons.
IIRC, the "same position" check is not looking at pixel position but
character position, so either my recollection is faulty or there's
something else at play.
Stefan
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Mouse click vs drag
2020-09-22 16:24 ` Stefan Monnier
@ 2020-09-22 17:07 ` Eli Zaretskii
0 siblings, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2020-09-22 17:07 UTC (permalink / raw)
To: help-gnu-emacs
> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Date: Tue, 22 Sep 2020 12:24:32 -0400
>
> > Clicks are difficult to achieve with hires display, because the mouse
> > cursor tends to move a couple of pixels or so when pressing and
> > releasing mouse buttons. Eg. in Customize buffers it is difficult to
> > push "Apply" or "Apply and Save" buttons.
>
> IIRC, the "same position" check is not looking at pixel position but
> character position
It checks both, AFAICT.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Mouse click vs drag
2020-09-22 15:57 Mouse click vs drag Petteri Hintsanen
2020-09-22 16:24 ` Stefan Monnier
@ 2020-09-22 16:38 ` Eli Zaretskii
2020-09-22 17:08 ` Petteri Hintsanen
1 sibling, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2020-09-22 16:38 UTC (permalink / raw)
To: help-gnu-emacs
> From: Petteri Hintsanen <petterih@iki.fi>
> Date: Tue, 22 Sep 2020 18:57:36 +0300
>
> I have a high resolution ("4K") display and I’m struggling with mouse
> clicks. They seem to get mixed up with mouse drag events. If I
> understand mouse click logic correctly, button press + button release
> events generate a click event only when the cursor is at the same screen
> location during press and release. Otherwise it is a drag event.
>
> Clicks are difficult to achieve with hires display, because the mouse
> cursor tends to move a couple of pixels or so when pressing and
> releasing mouse buttons. Eg. in Customize buffers it is difficult to
> push "Apply" or "Apply and Save" buttons.
>
> Is there some kind of fuzziness parameter to tune, like
> double-click-fuzz? Would it make sense to have one?
Did you try to enlarge double-click-fuzz?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Mouse click vs drag
2020-09-22 16:38 ` Eli Zaretskii
@ 2020-09-22 17:08 ` Petteri Hintsanen
2020-09-22 17:12 ` Eli Zaretskii
0 siblings, 1 reply; 8+ messages in thread
From: Petteri Hintsanen @ 2020-09-22 17:08 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: help-gnu-emacs
Eli Zaretskii <eliz@gnu.org> writes:
> Did you try to enlarge double-click-fuzz?
Tried now, doesn’t help. It does the right thing for double clicks, as
expected, but I’d need a similar variable for single clicks.
Thanks,
Petteri
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Mouse click vs drag
2020-09-22 17:08 ` Petteri Hintsanen
@ 2020-09-22 17:12 ` Eli Zaretskii
2020-09-22 17:50 ` Petteri Hintsanen
0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2020-09-22 17:12 UTC (permalink / raw)
To: help-gnu-emacs
> From: Petteri Hintsanen <petterih@iki.fi>
> Cc: help-gnu-emacs@gnu.org
> Date: Tue, 22 Sep 2020 20:08:23 +0300
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > Did you try to enlarge double-click-fuzz?
>
> Tried now, doesn’t help.
It does here.
What did you try? For a mouse-movement NOT to be interpreted as a
mouse-drag, the movement must be smaller than double-click-fuzz AND
the mouse pointer should stay on the same buffer position.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Mouse click vs drag
2020-09-22 17:12 ` Eli Zaretskii
@ 2020-09-22 17:50 ` Petteri Hintsanen
0 siblings, 0 replies; 8+ messages in thread
From: Petteri Hintsanen @ 2020-09-22 17:50 UTC (permalink / raw)
To: help-gnu-emacs
Eli Zaretskii <eliz@gnu.org> writes:
> What did you try? For a mouse-movement NOT to be interpreted as a
> mouse-drag, the movement must be smaller than double-click-fuzz AND
> the mouse pointer should stay on the same buffer position.
I did:
$ emacs -Q
C-h v double-click-fuzz RET
{click on "customize"}
{change "Double Click Fuzz" to 30}
{click on "Apply", verify that State changes to "SET for current
session only."}
{click on "Revert...", slightly moving the mouse [less than 30 px]
between button press and release}
Expected result: "Reset settings" popup appears.
Actual result: Nothing happens.
But you’re right, increasing double-click-fuzz has the desired effect in
other "clickable" places like Speedbar and Gnus Summary buffer. This is
great and just what I was looking for. Maybe widgets do not respect
double-click-fuzz for some reason?
I see this behaviour is explained in double-click-fuzz docstring ("This
variable is also the threshold for motion of the mouse to count as a
drag"). Too bad I couldn’t find that myself.
Thanks for your time.
Petteri
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Mouse click vs drag
@ 2020-09-23 8:09 Anders Munch
0 siblings, 0 replies; 8+ messages in thread
From: Anders Munch @ 2020-09-23 8:09 UTC (permalink / raw)
To: Petteri Hintsanen, help-gnu-emacs@gnu.org
Petteri Hintsanen WROTE:
> Clicks are difficult to achieve with hires display, because the mouse cursor
> tends to move a couple of pixels or so when pressing and releasing mouse
> buttons.
May I suggest you try a trackball instead of a mouse?
A trackball lets you to do movement and clicking as separate actions: First you
move the cursor into position with the ball, then you let go of the ball
completely and click. This way, you are completely free from click-induced
jitter.
regards, Anders
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-09-23 8:09 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-22 15:57 Mouse click vs drag Petteri Hintsanen
2020-09-22 16:24 ` Stefan Monnier
2020-09-22 17:07 ` Eli Zaretskii
2020-09-22 16:38 ` Eli Zaretskii
2020-09-22 17:08 ` Petteri Hintsanen
2020-09-22 17:12 ` Eli Zaretskii
2020-09-22 17:50 ` Petteri Hintsanen
-- strict thread matches above, loose matches on Subject: below --
2020-09-23 8:09 Anders Munch
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).