<AWT Dev> [7u6] Review request for 7159266: [macosx] ApplicationDelegate should not be set in the headless mode
Mike Swingler
swingler at apple.com
Thu Apr 5 13:31:13 PDT 2012
How would an SWT developer accept new "open document" file double-clicks, or listen for sleep/wake events? AFAIK, eAWT is the only aperture that handles that right now.
Regards,
Mike Swingler
Apple Inc.
On Apr 5, 2012, at 1:11 PM, steve.x.northover at oracle.com wrote:
> Hi all,
>
> Headless mode works fine for SWT. SWT doesn't use eAWT to do Quit etc. Instead, it uses the appropriate native cocoa calls.
>
> Steve
>
> On 05/04/2012 11:23 AM, Anthony Petrov wrote:
>> On 04/05/12 19:07, Mike Swingler wrote:
>>>> Please review a fix for http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7159266 at:
>>>>
>>>> http://cr.openjdk.java.net/~anthony/7u6-4-fxHang-7159266.0/
>>>>
>>>> With this fix we avoid setting an application delegate when AWT is started in the headless mode. This prevents a hang when another GUI toolkit (e.g. JavaFX) is already running in the same Java process.
>>>
>>> This would logically mean that you won't get eAWT events (file open, quit, etc) while started in this mode. Does this impact SWT as well?
>>
>> In the headless mode an application doesn't have any UI, and as such there's no way to generate e.g. a Quit action. Hence the application delegate isn't necessary in this mode.
>>
>> SWT uses a special "SWT mode" (== -XstartOnFirstThread) which is different from the headless mode. In the SWT mode the delegate will still be installed.
>>
>> I think this may not work in case of running an SWT application together with the AWT in headless mode. However, I can't imagine who might want to run SWT/AWT in such configuration because the headless mode is supposed to be primarily used in server environments where a display is physically unavailable, in which case SWT wouldn't be able to run there either.
>>
>> --
>> best regards,
>> Anthony
More information about the macosx-port-dev
mailing list