<AWT Dev> [9] Review request for 8165705: Robot.createScreenCapture produces black screenshot on Oracle Linux 7.1

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Thu Nov 24 14:54:03 UTC 2016


On 24.11.16 11:41, Semyon Sadetsky wrote:
> On 23.11.2016 20:37, Sergey Bylokhov wrote:
>
>> On 23.11.16 18:37, Semyon Sadetsky wrote:
>>> On 22.11.2016 02:06, Sergey Bylokhov wrote:
>>>
>>>> Hi, Semyon.
>>>> Why did you change the code to load the property each time the robot
>>>> will be created? I guess it is possible to change only the line in the
>>>> static block, so absent of "awt.robot.gtk" will mean use GTK.
>>> I did this small refactoring because I find the present code too verbose
>>> and poorly readable.
>>
>> But probably it will be possible cleanup it further and to read this
>> property only once, as before the fix?
> Probably. Can you provide a reason to keep this restriction?

This is common usecase, when the property read only once, and the value 
is used across all application timeframe. I am not sure but the "if" 
statement which had 3 lines of code does not look better that the old code.

>>
>>>>
>>>> On 18.11.16 14:24, Semyon Sadetsky wrote:
>>>>> Hello,
>>>>>
>>>>> Please review fix for JDK9:
>>>>>
>>>>> bug: https://bugs.openjdk.java.net/browse/JDK-8165705
>>>>>
>>>>> webrev: http://cr.openjdk.java.net/~ssadetsky/8165705/webrev.00/
>>>>>
>>>>> Fix 8150954 made it possible to take screenshots from compositing
>>>>> WM on
>>>>> Linux without use of GTK library.
>>>>>
>>>>> But the suggested solution is not compatible with some environments
>>>>> and
>>>>> also it cannot take screenshots in the full-screen mode. The proposed
>>>>> fix suggests to use the GTK based screenshots by default and only
>>>>> enable
>>>>> the 8150954 logic if awt.robot.gtk system property is set to false.
>>>>>
>>>>> The change should not limit the use of AWT robot to GTK2 compatible
>>>>> applications because JDK9 supports both GTK versions.
>>>>>
>>>>> --Semyon
>>>>>
>>>>
>>>>
>>>
>>
>>
>


-- 
Best regards, Sergey.


More information about the awt-dev mailing list