Bug 328339 Part activation history seems to ignore detached windows
1. Detach a view. 2. Drag another view into said detached window. 3. Activate the two views alternatively. 4. Close one of them. 5. A part in the workbench window is activated instead of the other view in the detached window.
bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/PartActivationHistory.java
return element instanceof MPart ? (MPart) element : candidate;
					}
					return candidate;
				}
			}
		}
		return null;
	}
	private MPart findActivationCandidate(Collection<MPart> candidates, MPart currentlyActivePart) {
		for (MPart candidate : candidates) {
			if (candidate != currentlyActivePart && candidate.isToBeRendered()
					&& candidate.isVisible()) {
				MPlaceholder placeholder = partService.getLocalPlaceholder(candidate);
				if (placeholder == null) {
					MElementContainer<MUIElement> parent = candidate.getParent();
					
					if (parent instanceof MGenericStack) {
						if (parent.getSelectedElement() == candidate) {
							return candidate;
						}
					} else {
						return candidate;
					}
				} else if (placeholder.isToBeRendered() && placeholder.isVisible()) {
					MElementContainer<MUIElement> parent = placeholder.getParent();