Skip to content

Commit 990d506

Browse files
amartya4256HeikoKlare
authored andcommitted
Resize Current Caret While Autoscaling
This commit contributes to autoscaling the Caret which was last managed by the OS (hence the current caret) while autoscaling since there can only be one Caret visibile at a time. Also, the changes make sure that we do not change the visibility state of the Caret while autoscaling.
1 parent eea6f54 commit 990d506

File tree

1 file changed

+3
-1
lines changed
  • bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets

1 file changed

+3
-1
lines changed

bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Caret.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,9 @@ void handleDPIChange(Event event, float scalingFactor) {
665665
if (font != null) {
666666
setFont(font);
667667
}
668-
if (isVisible && hasFocus ()) resize();
668+
if (isFocusCaret()) {
669+
setFocus();
670+
}
669671
}
670672
}
671673

0 commit comments

Comments
 (0)