mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[10.0.1] Toolwindow title bar paiting fix (active/inactive)
This commit is contained in:
@@ -114,7 +114,8 @@ public class FocusManagerImpl extends IdeFocusManager implements Disposable {
|
||||
final Component c = fe.getComponent();
|
||||
if (c instanceof Window || c == null) return false;
|
||||
|
||||
Component parent = UIUtil.findUltimateParent(c);
|
||||
Component parent = SwingUtilities.getWindowAncestor(c);
|
||||
|
||||
if (parent instanceof IdeFrame) {
|
||||
myLastFocused.put((IdeFrame)parent, new WeakReference<Component>(c));
|
||||
}
|
||||
|
||||
@@ -176,10 +176,12 @@ public final class InternalDecorator extends JPanel implements Queryable, TypeSa
|
||||
}
|
||||
|
||||
public boolean isFocused() {
|
||||
Component component = IdeFocusManager.getInstance(myProject).getFocusedDescendantFor(myToolWindow.getComponent());
|
||||
IdeFocusManager fm = IdeFocusManager.getInstance(myProject);
|
||||
Component component = fm.getFocusedDescendantFor(myToolWindow.getComponent());
|
||||
if (component != null) return true;
|
||||
|
||||
Component owner = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();
|
||||
Component owner = fm.getLastFocusedFor(WindowManager.getInstance().getIdeFrame(myProject));
|
||||
|
||||
return owner != null && SwingUtilities.isDescendingFrom(owner, myToolWindow.getComponent());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user