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 708ccf3
Showing 1 changed file with 3 additions and 1 deletion.
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

0 comments on commit 708ccf3

Please sign in to comment.