Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] Cocoa SWT_AWT issues, and a new API proposal



platform-swt-dev-bounces@xxxxxxxxxxx wrote on 09/21/2009 12:49:48 PM:

> [image removed]

>
> Re: [platform-swt-dev] Cocoa SWT_AWT issues, and a new API proposal

>
> Scott Kovatch

>
> to:

>
> Eclipse Platform SWT component developers list.

>
> 09/21/2009 12:50 PM

>
> Sent by:

>
> platform-swt-dev-bounces@xxxxxxxxxxx

>
> Please respond to "Eclipse Platform SWT component developers list."

>
>
> On Sep 21, 2009, at 7:22 AM, Silenio Quarti wrote:
>
> > I believe that detecting if  TransformProcessType()needs be called  
> > should be done as this bug describes.
> >
> >
https://bugs.eclipse.org/bugs/show_bug.cgi?id=268687
>
> I agree, though that's a separate problem from what I was running into  
> here.  In this case, we weren't calling TransformProcessType() because  
> NSApplication.isRunning() returned true, but the AWT did not call it  
> either because it detected that the app was started from thread 0.  I  
> wrote AWT startup to do the bare minimum if -XstartOnFirstThread was  
> detected on the assumption that the SWT would be used.
>

I agree it is a different problem, but it would fix your problem as well. We would not check if the application is running. We would just check if the application was bundled in order to decide if TPT should be called.

> I can work on detecting whether or not TPT should be called, though.  
> I had to make a similar change to the Carbon SWT for Flash Catalyst to  
> work around a related problem.

Is the way I describe on the bug (check to executable path) similar to what you did? If so, I will finish up the outstanding changes I have in my workspace.

>
> > As for documenting the rules, we can add something on the SWT FAQ or  
> > to the java doc of SWT_AWT.java. It seems that we should not support  
> > the case where the app is started without the -XstartOnFirstThread  
> > option.
>
> Can you clarify a bit?  SWT_AWT should not support it or Display  
> should not support being created off the main thread?
>


I believe we cannot support either. Java has to be started with -XstartOnFirstThread and the Display has to be created in the main thread. SWT_AWT.new_shell() has the same restriction.

Silenio

> -- Scott
>
> > > A few notes: display is created in the main method, as recommended
> > > by SWT. The Swing UI is created in the EDT, as recommended by AWT/
> > > Swing.
> >
> > Are these kinds of rules documented anywhere?  If devs "follow the
> > rules" as defined in this example, I don't have to make that many
> > changes to Shell or Display, except to detect when the Shell doesn't
> > own its window, as would be the case in the SWT_AWT new_Shell state.
>
> _______________________________________________
> platform-swt-dev mailing list
> platform-swt-dev@xxxxxxxxxxx
>
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev

Back to the top