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.
tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/application/EPartServiceTest.java
public void testSaveAll_NoHandlers_F_FF_FF() {
		testSaveAll_NoHandlers(false, new boolean[] { false, false },
				new boolean[] { false, false });
	}
	public void testSwitchWindows() {
		
		MApplication application = ApplicationFactoryImpl.eINSTANCE
				.createApplication();
		MWindow window1 = BasicFactoryImpl.eINSTANCE.createWindow();
		MWindow window2 = BasicFactoryImpl.eINSTANCE.createWindow();
		application.getChildren().add(window1);
		application.getChildren().add(window2);
		application.setSelectedElement(window1);
		
		MPart part = BasicFactoryImpl.eINSTANCE.createPart();
		window1.getChildren().add(part);
		window1.setSelectedElement(part);
		
		initialize(applicationContext, application);
		
		getEngine().createGui(window1);
		getEngine().createGui(window2);
		EPartService windowService1 = (EPartService) window1.getContext().get(
				EPartService.class.getName());
		EPartService windowService2 = (EPartService) window2.getContext().get(
				EPartService.class.getName());
		assertNotNull(windowService1);
		assertNotNull(windowService2);
		assertNotNull("The first part is active in the first window",
				windowService1.getActivePart());