From 08d06f9032352d79b1e264cd37ba179784137a74 Mon Sep 17 00:00:00 2001 From: Maximilian Wittmer Date: Mon, 1 Jul 2024 15:17:21 +0200 Subject: [PATCH] Find/Replace overlay: improve reaction to windows resizing The positioning of the overlay to it's texteditor happens now asynchronously, improving misunderstandings in positioning. fixes #1992 --- .../internal/findandreplace/overlay/FindReplaceOverlay.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bundles/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/findandreplace/overlay/FindReplaceOverlay.java b/bundles/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/findandreplace/overlay/FindReplaceOverlay.java index 16a035a3a40..a669f3f1d3c 100644 --- a/bundles/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/findandreplace/overlay/FindReplaceOverlay.java +++ b/bundles/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/findandreplace/overlay/FindReplaceOverlay.java @@ -221,12 +221,12 @@ private void toggleToolItem(ToolItem toolItem) { private ControlListener shellMovementListener = new ControlListener() { @Override public void controlMoved(ControlEvent e) { - positionToPart(); + getShell().getDisplay().asyncExec(() -> positionToPart()); } @Override public void controlResized(ControlEvent e) { - positionToPart(); + getShell().getDisplay().asyncExec(() -> positionToPart()); } };