Skip to content

Commit

Permalink
Replace AbstractHoverInformationControl on FocusIn
Browse files Browse the repository at this point in the history
With this commit, the hover information control can be replaced on the
focus in event.

contributes to eclipse-platform/eclipse.platform.swt#1540
  • Loading branch information
amartya4256 committed Oct 16, 2024
1 parent 7d29a59 commit 0d7550d
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ public void start(Rectangle subjectArea) {

fDisplay.addFilter(SWT.FocusOut, this);

fDisplay.addFilter(SWT.FocusIn, this);
fDisplay.addFilter(SWT.MouseDown, this);
fDisplay.addFilter(SWT.MouseUp, this);

Expand Down Expand Up @@ -270,6 +271,7 @@ else if (event.type == SWT.MouseVerticalWheel && cancelReplacingDelay())
}
break;

case SWT.FocusIn:
case SWT.MouseUp:
case SWT.MouseDown:
if (!hasInformationControlReplacer())
Expand All @@ -282,7 +284,7 @@ else if (!isReplaceInProgress()) {
if (!(iControl5.containsControl(control))) {
hideInformationControl();
} else if (cancelReplacingDelay()) {
if (event.type == SWT.MouseUp) {
if (event.type == SWT.MouseUp || event.type == SWT.FocusIn) {
stop(); // avoid that someone else replaces the info control before the async is exec'd
if (infoControl instanceof IDelayedInputChangeProvider) {
final IDelayedInputChangeProvider delayedICP= (IDelayedInputChangeProvider) infoControl;
Expand Down Expand Up @@ -337,7 +339,6 @@ private void handleMouseMove(Event event) {

if (fSubjectArea.contains(mouseLoc))
return;

IInformationControl iControl= getCurrentInformationControl();
if (!hasInformationControlReplacer() || !canMoveIntoInformationControl(iControl)) {
if (AbstractHoverInformationControlManager.this instanceof AnnotationBarHoverManager) {
Expand Down

0 comments on commit 0d7550d

Please sign in to comment.