IJPL-161517 Fix editor splitters resize

This code was originally intended to handle only loading decorators,
so it breaks on other layered panes. In particular, there's a layered
pane in the editor since the floating toolbar was added.
Because of this, this code would never return the vertical scrollbar,
as it's a direct child of that layered pane.

Now that it's fixed, JBScrollPane.canBePreprocessed
correctly handles this scrollbar and doesn't let the splitter's
divider to take over as long as the mouse is over the scrollbar's
thumb.

GitOrigin-RevId: 50c0d640f561db87c3879d8fd3e8694693f80675
This commit is contained in:
Sergei Tachenov
2025-08-19 15:45:58 +00:00
committed by intellij-monorepo-bot
parent a7bfcc3cc4
commit c86bf79649
@@ -1733,7 +1733,7 @@ public final class UIUtil {
component = getDeepestComponentAtForComponent(parent, x, y, rootPane.getContentPane());
}
}
if (component != null && component.getParent() instanceof JLayeredPane) { // Handle LoadingDecorator
if (component != null && component.getParent() instanceof LoadingDecoratorLayeredPane) {
Component[] components = ((JLayeredPane)component.getParent()).getComponentsInLayer(JLayeredPane.DEFAULT_LAYER);
if (components.length == 1 && ArrayUtilRt.indexOf(components, component, 0, components.length) == -1) {
component = getDeepestComponentAtForComponent(parent, x, y, components[0]);