<AWT Dev> Taking screenshots on x11 composite desktop produce wrong result
neugens.limasoftware at gmail.com
Mon May 30 10:02:41 UTC 2016
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.
>>> 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.
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?
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.
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA FC7C 4086 63E3 80F2 40CF
Java Champion - Blog: http://neugens.wordpress.com - Twitter: @neugens
Proud GNU Classpath developer: http://www.classpath.org/
Please, support open standards:
More information about the awt-dev