Review request for MACOSX_PORT-651: Modal behavior difference with and without Robot interaction

Leonid Romanov leonid.romanov at oracle.com
Thu Dec 29 08:26:04 PST 2011


Hi,
I've tried your suggestion and it didn't make any difference. 
Here is updated webrev:
http://cr.openjdk.java.net/~leonidr/7124289/webrev.00/

Leonid.

On 23.12.2011, at 16:22, Anthony Petrov wrote:

> Hi Leonid,
> 
> I'm not an Apple guy, but I'll chime in anyway. Firstly, the Internets suggest that your fix is okay [1]. BTW, I'd suggest to initialize the static variables that you put into blocks, since you assign values to them conditionally, but use them in any case. I realize that normally a MouseUP doesn't come before a MouseDown, but just in case... After all it's a user who calls Robot methods.
> 
> However, FWIW, have you tried using a different event tap (kCGHIDEventTap instead of kCGSessionEventTap) to post events w/o dealing with the event numbers? We use kCGHIDEventTap in another project, and I don't recall any issues requiring us to set the event numbers for synthetic mouse events explicitly. Perhaps we don't use this piece of code too very often to encounter the issue though, but still this idea is worth giving it a try, isn't it?
> 
> [1] http://stackoverflow.com/questions/2602224/synthetic-click-doesnt-switch-applications-menu-bar-mac-os-x
> 
> --
> best regards,
> Anthony
> 
> On 12/22/2011 10:10 PM, Leonid Romanov wrote:
>> Hello!
>> Please review the fix for http://java.net/jira/browse/MACOSX_PORT-651
>> I'm not really satisfied with the fix (you will understand why when you see it), so it would be great if Apple guys could take a look at it.
>> The webrev is located at:
>> http://cr.openjdk.java.net/~leonidr/event-number/
>> Thanks,
>> Leonid.



More information about the macosx-port-dev mailing list