"Smudge" factor on Mac OSX mouse events?
Laird Nelson
ljnelson at gmail.com
Tue Jun 24 06:38:29 UTC 2025
On Mon, Jun 23, 2025 at 10:54 PM Jeremy Wood <mickleness at gmail.com> wrote:
> I can’t speak to the Apple Magic Mouse specifically, but at my old job we
> wrote a work-around
> <https://github.com/mickleness/pumpernickel/blob/master/src/main/java/com/pump/awt/ClickSensitivityControl.java>
> for a very similar-sounding complaint: we received MOUSE_PRESSED and
> MOUSE_RELEASED events just fine, but we didn’t receive MOUSE_CLICKED events
> unless the mouse location stayed exactly the same.
>
Right; that seems to be what happens in every platform-specific AWT
machinery in the JDK except the XWindows one, to my naïve reading, which
"solves" the issue by saying, well, if the mouse didn't move more than
{checks notes} four pixels (the "smudge factor"), we're good. On the Mac
with its built-in trackpad (and maybe with wired external mice, or others)
this hack doesn't appear to be necessary, but I wonder if the Magic Mouse
is exhibiting the same sort of behavior that originally led the
XWindows-specific JDK machinery author to introduce the four-pixel "smudge
factor" for that platform. Perhaps it should be introduced for the Mac as
well.
L
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/client-libs-dev/attachments/20250623/8681fccd/attachment.htm>
More information about the client-libs-dev
mailing list