[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Re: When can setFocus return false?

> If I get it correctly, the lesson learn is that no "rich" (i.e.
> involving unknown listeners) code should be executer directly from SWT
> event handlers, but rather display.asyncExec should be used to run them
> with "clean" stack trace. Is this correct?

I don't think I'd state this as a general rule, but I can see how it could
help in this case since changing focus in a FocusOut callback is attempting
to reassign focus at the same time that the OS is.  AsyncExec()'ing it
allows the OS to finish its in-progress focus reassignment and be ready for
the next one.  I think I remember this being the case in the past on motif
in particular (not sure about windows, but I believe you ;-) ).

Grant