Project: SWT
Bug 86216 Display.getActiveShell() slow with lots of widgets
Reported: 2005-02-22 18:20:08 | Status: resolved fixed

If no shell is active, Display.getActiveShell() currently has to loop over every widget. Since only one shell can be active at any given time, we can optimize this case.

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java