Skip to content

Commit be586c5

Browse files
Bugfix for Hover which is visible above other application windows. #2534
This patch is fixing the problem, where the HoverManagers listeners are deregistered but the hover is still visibile on top. This happens when the hover was sticky eclipse was minimized and put back on foreground after it. In that case the listeners are already deregistered and there is no chance to react at all. So for this case the visibility has to be set explicitly when the close is going to stop.
1 parent 7aaa014 commit be586c5

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

bundles/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/StickyHoverManager.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@
2828
import org.eclipse.swt.widgets.Display;
2929
import org.eclipse.swt.widgets.Event;
3030
import org.eclipse.swt.widgets.Listener;
31+
import org.eclipse.swt.widgets.Shell;
3132

3233
import org.eclipse.jface.util.Geometry;
3334

35+
import org.eclipse.jface.text.AbstractInformationControl;
3436
import org.eclipse.jface.text.IInformationControl;
3537
import org.eclipse.jface.text.IInformationControlExtension3;
3638
import org.eclipse.jface.text.IInformationControlExtension5;
@@ -142,6 +144,14 @@ public void stop() {
142144
if (fInformationControlToClose != null)
143145
fInformationControlToClose.removeFocusListener(this);
144146

147+
// Was added to fix the bug #2534
148+
if (fInformationControlToClose instanceof AbstractInformationControl infoControl) {
149+
Shell shell= infoControl.getShell();
150+
if (!shell.isDisposed()) {
151+
shell.setVisible(false);
152+
}
153+
}
154+
145155
if (fDisplay != null && !fDisplay.isDisposed()) {
146156
fDisplay.removeFilter(SWT.MouseMove, this);
147157
fDisplay.removeFilter(SWT.FocusOut, this);

0 commit comments

Comments
 (0)