Project: SWT
Bug 38022 widget.forceFocus() causes shell.setActive() ?
Reported: 2003-05-23 05:02:59 | Status: closed wontfix

Following code snippet causes the whole application window act something like SYSTEM_MODAL - a window containing a widget with such a focus listener is always on top! ----------------------------------------------------------------------------- widget.addFocusListener(new FocusListener() { public void focusLost(FocusEvent fe) { // grab keyboard focus again Display.getCurrent().asyncExec(new Runnable() { public void run() { widget.forceFocus(); } }); } });

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Control.java bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Decorations.java bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Sash.java bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Shell.java