From d62585ca77a667224dc5cdcc126ac2f32e462482 Mon Sep 17 00:00:00 2001 From: Aleksey Pivovarov Date: Wed, 13 Mar 2024 15:28:51 +0100 Subject: [PATCH] IDEA-346403 actions: fix AnAction invocation on mouse click for components under an active LoadingDecorator BranchesTree in VCS Log is using 'ProgressStripe' with 'LoadingDecorator' to display progress bar. It transforms into a 'LoadingDecoratorLayeredPane' being used to draw this progress bar. 'SwingUtilities.getDeepestComponentAt' navigates into 'LoadingDecorator.LoadingLayer' of this layered pane when asked about the target component. This makes global Mouse AnAction inaccessible if they depend on the DataContext of the component located inside the loading decorator. Fix the issue by using 'UIUtil.getDeepestComponentAt' that explicitly handles the 'LoadingDecorator' case. GitOrigin-RevId: 132beab6d734323e0f342c38ad828f9cc96a5765 --- .../intellij/openapi/keymap/impl/IdeMouseEventDispatcher.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/keymap/impl/IdeMouseEventDispatcher.java b/platform/platform-impl/src/com/intellij/openapi/keymap/impl/IdeMouseEventDispatcher.java index dbc159e37717..1a6772d43176 100644 --- a/platform/platform-impl/src/com/intellij/openapi/keymap/impl/IdeMouseEventDispatcher.java +++ b/platform/platform-impl/src/com/intellij/openapi/keymap/impl/IdeMouseEventDispatcher.java @@ -218,7 +218,7 @@ public final class IdeMouseEventDispatcher { if (c == null) { throw new IllegalStateException("component cannot be null"); } - c = SwingUtilities.getDeepestComponentAt(c, e.getX(), e.getY()); + c = UIUtil.getDeepestComponentAt(c, e.getX(), e.getY()); if (c instanceof IdeGlassPaneImpl) { c = ((IdeGlassPaneImpl)c).getTargetComponentFor(e);