<AWT Dev> Taking screenshots on x11 composite desktop produce wrong result

Semyon Sadetsky semyon.sadetsky at oracle.com
Mon May 30 15:53:23 UTC 2016



On 5/30/2016 1:02 PM, Mario Torre wrote:
> 2016-04-06 14:02 GMT+02:00 Semyon Sadetsky <semyon.sadetsky at oracle.com>:
>>
>> On 4/6/2016 2:19 PM, Mario Torre wrote:
>>> On Wed, Apr 6, 2016 at 12:50 PM, Semyon Sadetsky
>>> <semyon.sadetsky at oracle.com> wrote:
>>>> Hello Mario,
>>>>
>>>> Seems X11 call would be the best solution for AWT Robot screenshots under
>>>> Linux. I'm ready to approve it as a default solution.
>>>> But it seems to me better to preserve the current GTK dependent code as a
>>>> kind of alternative solution for platforms where GTK is better supported.
>>>> Is
>>>> it reasonable for you?
>>> Do you have in mind some compile time switch to select the appropriate
>>> code path, or to invert the existing code path to default to x11?
>> Not compile time switch but run-time. I would introduce a new system
>> property, for example "-Dawt.robot.gtk=true". Just in case if your solution
>> will stop to work on some platforms or WMs. GTK may be the working
>> alternative there.
> Hello Semyon,
>
> Sorry for the delay in getting back to you for this, I've been very busy :(
>
> Anyway, I believe this is what you asked me to do, right?
>
> http://cr.openjdk.java.net/~neugens/8150954/webrev.03/
Yes. It looks nice. Thank you!
>
> The default path is to use X11, if the user sets the system property,
> gtk is used instead.
>
> Btw, I didn't change the code to load the gtk toolkit other than
> moving it within the if block, but the Toolkit variable could go away
> since we already have "tk" visible just a few line before, if you want
> I can make this simple cleanup.
>
> Please, let me know if you want other modifications.
Yes, the toolkit var in line 60 is surplus. That would be perfect to 
remove it.
The rest is OK to me.

--Semyon
>
> Cheers,
> Mario
Hello Mario



More information about the awt-dev mailing list