hg: macosx-port/macosx-port/jdk: MACOSX_PORT-36: Toolkit.getScreenInsets() returns empty insets

Mike Swingler swingler at apple.com
Thu Jul 28 08:18:09 PDT 2011


On Jul 28, 2011, at 7:57 AM, Sergey Bylokhov wrote:

> Hi Mike,
> 
> Thanks for review the changes!
> 
>> There is a problem with this change set: you did not CFRetain() the screen pointer before bubbling it up to Java, and you also need to CFRelease() it when you are done. Otherwise, you will crash if the screen geometry is changing while this code is running.
>> 
>> It may be worth wrapping the NSScreen in it's own Java subclass of CFRetainedResource that will handle these details for you. As is, the thread safety is correct.
>> 
>> Should I file a bug on this?
> 
> Yes, it'll be good.

Done: <http://java.net/jira/browse/MACOSX_PORT-196>.

Thanks much for your help,
Mike Swingler
Java Engineering
Apple Inc.



More information about the macosx-port-dev mailing list