Project: Eclipse_Platform_UI
Bug 379299 Detached Windows cause IllegalArgumentExceptions when switching to a new perspective
Reported: 2012-05-11 14:49:40 | Status: verified fixed

There's a 'layout' call in the PartRenderingEngine's visibilityHandler that tries to keep the layout up to date when an element's 'visible' flag changes. To reproduce start fresh drag a stack out to have a detached window open some other perspective When we're hiding the detached window we get the following trace: java.lang.IllegalArgumentException: Widget has the wrong parent at org.eclipse.swt.SWT.error(SWT.java:4342) at org.eclipse.swt.SWT.error(SWT.java:4276) at org.eclipse.swt.SWT.error(SWT.java:4247) at org.eclipse.swt.widgets.Widget.error(Widget.java:468) at org.eclipse.swt.widgets.Composite.layout(Composite.java:773) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.handleEvent(PartRenderingEngine.java:190) at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:41) ... The issue is that we can't use the standard layout logic here since the DW *is* a shell.

Files changed in fix:
bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/PartRenderingEngine.java