Project: SWT
Bug 391892 [OS X 10.7] Incorrect window collection behavior for SWT.TOOL style shell under full screen mode
Reported: 2012-10-15 02:47:01 | Status: resolved fixed

In org.eclipse.swt.widgets.Shell.createHandle method, a non-owned shell is given the window collection behavior NSWindowCollectionBehaviorFullScreenPrimary. This is incorrect for SWT.TOOL style shell and it may cause space switch (a usability pain) if you show a SWT.TOOL style shell under full screen mode. The fix is to use NSWindowCollectionBehaviorFullScreenAuxiliary for SWT.TOOL style shell, i.e.: int behavior = 0; if (parent != null) behavior |= OS.NSWindowCollectionBehaviorMoveToActiveSpace; if (OS.VERSION >= 0x1070) { if (parent == null) { if ((style & (SWT.TOOL | SWT.SHEET)) != 0) behavior = OS.NSWindowCollectionBehaviorFullScreenAuxiliary; else behavior = OS.NSWindowCollectionBehaviorFullScreenPrimary; } } if (behavior != 0) window.setCollectionBehavior(behavior);

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java