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.

This came up because some of our users were kindergarteners, and they often lacked the fine motor schools to tap touchpads in exactly the same spot.

IMO I’d also consider these complaints bugs, but I’m not an OpenJDK member and I certainly don’t have the historical knowledge that some people here might have about whether this is intentional or not. I’m curious to see what other folks say…?

Regards,
 - Jeremy

------ Original Message ------
From "Laird Nelson" <ljnel...@gmail.com>
To client-libs-dev@openjdk.org
Date 6/23/2025 10:03:06 PM
Subject "Smudge" factor on Mac OSX mouse events?

(Disclaimer: I happen to work for Oracle but this has nothing to do with my job.)

I have been having trouble double-clicking things with my Apple Magic Mouse on my M1 Mac when running (Swing-based) Netbeans (see https://github.com/apache/netbeans/issues/8609 and the inciting discussion at https://github.com/apache/netbeans/discussions/8580). I noticed that perhaps (?) this is due to the lack of a "smudge factor" correcting for inadvertent tiny mouse motion events while double clicking. It seems, perhaps, that the Magic Mouse is very finicky in this area where the built-in Mac trackpad is not.

At any rate, the XWindows toolkit has this: https://github.com/openjdk/jdk/blob/master/src/java.desktop/unix/classes/sun/awt/X11/XWindow.java#L71-L75

But perhaps (?) the analogous Mac OSX area does not: https://github.com/openjdk/jdk/blob/master/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformResponder.java#L71-L79 and it seems like this might result in the observed behavior.

Is this a bug or works-as-it-does?

Best,
Laird

Reply via email to