Skip to main content

Platform and Equinox API

Platform Changes

SWT Changes

Control.setFocus() can be configured to avoid activating its shell Calling Control.setFocus() also activates its containing Shell. This behavior is undocumented and somewhat surprising; it makes it impossible to set focus on a specific control in a background shell without that shell popping to the foreground as a side effect. The new system property org.eclipse.swt.internal.activateShellOnForceFocus can be used to disable this side effect such that only an explicit call to Shell.setActive() will bring the shell to the foreground.

The new system property can be added as VM argument in the eclipse.ini after the -vmargs line in that file to disable the activation side effect for a product:

-Dorg.eclipse.swt.internal.activateShellOnForceFocus=false

Or it can be specified on the command line as -vmargs -Dorg.eclipse.swt.internal.activateShellOnForceFocus=false.

See SWT Issue 450

Previous Up Next

Back to the top