<AWT Dev> Taking screenshots on x11 composite desktop produce wrong result
Mario Torre
neugens at redhat.com
Tue Mar 8 12:21:00 UTC 2016
Hi Sergey,
Here is a proposed fix for JDK9, it removes the dependencies on GTK
and use only X11 calls:
http://cr.openjdk.java.net/~neugens/8150954/webrev.02/
I only tried this on a RHEL 7.2 so far but it seems to compile and
work as expected, and doesn't require to regenerate the configure
machinery either.
I'm not sure if you prefer to go to the extra length of using dynamic
loading for those functions, my assumption is that any system that has
XRender will likely also have XComposite (even if no composite manager
is around), but I don't know for sure.
I'm still not totally convinced we should use X11 directly, instead we
should probably move to using GTK always[1], but I realise this is the
longest path[2].
Cheers,
Mario
[1] GTK3 possibly.
[2] And of course, I'm totally willing to help here.
On Wed, Mar 2, 2016 at 5:45 PM, Mario Torre <neugens at redhat.com> wrote:
> On Wed, Mar 2, 2016 at 5:24 PM, Sergey Bylokhov
> <Sergey.Bylokhov at oracle.com> wrote:
>> Hi, Mario.
>> I assume that it works exactly the same as gtk version? if yes then it will
>> be good to change the code in jdk9 as well and remove this dependency?
>
> You mean to remove the dependency on GTK and use the X11 code?
>
> It would make sense to try to avoid loading GTK at all if we don't
> need it, so I would prefer this. On the other end, with Wayland
> approaching we should move to a platform agnostic toolkit (GTK or find
> an alternative).
>
> Eventually, I would like to see (in the long run at least) more
> abstraction here, the way everything is mixed up makes things more
> complicated.
>
> So bottom line I'm open to make this change, let me know if you would
> like me to port this code to JDK9 and remove the current references to
> GTK in Robot.c.
>
> Cheers,
> Mario
More information about the awt-dev
mailing list