<AWT Dev> RFR: 8025673: Disable X11 AWT toolkit
Artem Ananiev
artem.ananiev at oracle.com
Wed Oct 23 08:11:47 PDT 2013
On 10/23/2013 4:34 PM, Anthony Petrov wrote:
> On 10/23/2013 08:52 AM, David Holmes wrote:
>> On 23/10/2013 2:10 PM, David DeHaven wrote:
>>>
>>> Updated webrev:
>>>
>>> http://cr.openjdk.java.net/~ddehaven/8025673/jdk.2/
>>>
>>> Summary of changes since last:
>>> - Added awt_headless to java_props_t (set to NULL by default which
>>> does not set the property)
>>
>> Not sure about this part. We already force this property to be set in
>> Embedded without needing any changes in the code you have modified and
>> I'm not sure if your changes will break what we already do. Why do you
>> need to do it?
>>
>> I'm getting concerned about this change touching stuff outside of OSX.
>
> I think I agree with David. E.g. I'm not sure I like changing
> j/l/System.c for this fix.
>
> Given the time constraints, perhaps going with HToolkit would be a good
> enough solution for now?
>
> Artem, what's your opinion?
I'm personally fine with the current version. The fix is now Mac OS X
specific, as sprops.awt_headless is only set within #ifdef MACOSX, it
won't have any impact on other platforms. At the same time it enables
headless functionality on Mac OS X, while HToolkit doesn't.
Note that it can be improved further. As it stands now, the only purpose
of getPreferredToolkit() is to check if Aqua session is active. The
toolkit we use is always CToolkit, regardless of what this method
returns, so the method can be removed, and isInAquaSession() can be
called instead. Leaving this further cleanup up to David D., though.
Thanks,
Artem
> --
> best regards,
> Anthony
>
>>
>> David
>>
>>> - Replaced the toolkit selection code in java_props_macosx.[ch]. I
>>> could have just exposed isAquaSession but I wanted to preserve the
>>> AWT_TOOLKIT environment variable support (no idea if it's actually
>>> used or not...).
>>> - Modified WrappedToolkitTest.sh to check that it's wrapping
>>> LWCToolkit in HeadlessToolkit and now all five awt/Toolkit/Headless
>>> jtreg tests pass.
>>>
>>> No build system or hotspot changes since the last patch.
>>>
>>> -DrD-
>>>
More information about the hotspot-dev
mailing list