<AWT Dev> [9] Review Request: 8143054 [macosx] KeyEvent modifiers do not contain information about mouse buttons

Alexander Scherbatiy alexandr.scherbatiy at oracle.com
Wed Dec 23 12:50:19 UTC 2015


  The fix looks good to me.

  Thanks,
  Alexandr.


On 11/18/2015 6:50 PM, Sergey Bylokhov wrote:
> Hello.
> Please review the fix for jdk9.
>
> On macosx when we create a KeyEvent we ignore the mouse state of all 
> mouse buttons, which means that mouse modifiers are missing.
> The only KeyEvent is affected, because when we convert NS modifiers to 
> java modifiers we use nsToJavaKeyModifiers(), but in all other cases 
> we use nsToJavaMouseModifiers() which is the same but adds mouse 
> modifiers.
>
> In the fix:
> - The button parameter of nsToJavaMouseModifiers() was removed because 
> it was unused.
> - nsToJavaMouseModifiers() was renamed to nsToJavaModifiers() and now 
> is used when keyEvent is generated.
> - nsToJavaKeyModifiers() was removed because it unused now.
>
> The similar bug for extended(id>=3) mouse buttons was filed for linux:
> https://bugs.openjdk.java.net/browse/JDK-8143240
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8143054
> Webrev can be found at: 
> http://cr.openjdk.java.net/~serb/8143054/webrev.00
>



More information about the awt-dev mailing list