<AWT Dev> [9] Review Request: 7124417 [macosx] failure in Window.initGC on Mac with monitor sleeping

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Wed Mar 19 17:29:26 UTC 2014


Hello, Anthony.
On 3/19/14 9:20 PM, Anthony Petrov wrote:
> Hi Sergey,
>
> Generally the fix looks good. I have only two concerns:
>
> 1. Previously we didn't exclude mirrored displays from the list. So 
> the new code that you're adding at lines 84-92 might be better 
> integrated as a separate fix.
Before the fix we use CGGetActiveDisplayList, which returns only active 
device w/o device in sleep or mirror state. The new function 
CGGetOnlineDisplayList return all of them and we should filter out 
mirror device.
>
> 2. Before the fix, the list of display devices returned from 
> getDisplayIDs was in the same order as reported by the native system. 
> After your fix the order is reversed. For instance, if previously the 
> main display was always at index [0], not it's always at the tail of 
> the array. This may or may not be a problem for Java applications 
> (likely not a serious problem). However, keeping the same order 
> between Java and native APIs might be a good thing for debugging 
> purposes. Would it be possible to modify the loop at lines 103-106 to 
> preserve the order?
It is not necessary, because we store them in the Map on java side anyway.
>
> -- 
> best regards,
> Anthony
>
> On 3/19/2014 7:27 PM, Sergey Bylokhov wrote:
>> Hello.
>> Please review the fix for jdk 9.
>> After the fix we use screen in sleep state as normal screen, where we
>> can create new windows, etc.
>> Disadvantage is that Robot still does not work on such devices.
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-7124417
>> Webrev can be found at: 
>> http://cr.openjdk.java.net/~serb/7124417/webrev.01
>>


-- 
Best regards, Sergey.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20140319/9b11edf9/attachment.html>


More information about the awt-dev mailing list