From fcb761b640545ddff0ed9beb3ec110dcb8297352 Mon Sep 17 00:00:00 2001 From: Curtis Windatt Date: Thu, 9 May 2013 15:47:47 -0500 Subject: Bug 402073 - Keyboard shortcuts sometimes do not work for other windows Change-Id: I472bc7ddf01f33372f6531aa8d011553a6123a62 --- .../src/org/eclipse/e4/ui/internal/workbench/PartServiceImpl.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/PartServiceImpl.java b/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/PartServiceImpl.java index c0a0cd6d50f..78763a1e6da 100644 --- a/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/PartServiceImpl.java +++ b/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/PartServiceImpl.java @@ -133,6 +133,7 @@ public class PartServiceImpl implements EPartService { private PartActivationHistory partActivationHistory; private MPart activePart; + private MPart activatedPart; private ListenerList listeners = new ListenerList(); @@ -557,7 +558,7 @@ public class PartServiceImpl implements EPartService { MWindow window = getWindow(); IEclipseContext windowContext = window.getContext(); // check if the active part has changed or if we are no longer the active window - if (windowContext.getParent().getActiveChild() == windowContext && part == activePart) { + if (windowContext.getParent().getActiveChild() == windowContext && part == activatedPart) { // insert it in the beginning of the activation history, it may not have been inserted // pending when this service was instantiated partActivationHistory.prepend(part); @@ -567,6 +568,9 @@ public class PartServiceImpl implements EPartService { if (contextService != null) { contextService.deferUpdates(true); } + + activatedPart = part; + try { // record any sibling into the activation history if necessary, this will allow it to be // reselected again in the future as it will be an activation candidate in the future, -- cgit v1.2.3