Review request for 7124382: [macosx] Property sun.awt.enableExtraMouseButtons is always 'false'
leonid.romanov at oracle.com
Thu Feb 2 04:37:17 PST 2012
On 02.02.2012, at 16:16, Artem Ananiev wrote:
> Some comments from my side:
> 1. It would be fine not to store gsNumberOfButtons and gsButtonDownMasks in the native code twice. Probably, caching may be done at the Java level, e.g. in LWCToolkit? BTW, static variables in native are really painful in MVM-like environment (if we ever really support it).
So, your suggestion is to use JNI field-access methods to get these cached values in native every time we need them, right?
> 2. I wonder how the following piece of code is expected to work:
> robot.mousePress(BUTTON1_DOWN_MASK | BUTTON2_DOWN_MASK)
> Should we post two native events in this case (CGEventCreateMouseEvent doesn't seem to support multiple buttons at once)? It's not a question about the current fix, but rather how it works, or doesn't work, right now.
We don't support it because it doesn't make sense: real user can't press both buttons exactly at the same time, one of the buttons would always be pressed before the other.
> On 2/2/2012 2:49 PM, Leonid Romanov wrote:
>> Please, review a fix for for http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7124382
>> webrev: http://cr.openjdk.java.net/~leonidr/7124382/webrev.00/
More information about the macosx-port-dev