Skip to content

Commit 9f60279

Browse files
amartya4256HeikoKlare
authored andcommitted
Fix Caret Rescaling for win32 #62
This commit fixes caret rescaling by making sure the the field height is updated for every caret and Caret::resize is called for those carets where applicable. contributes to #62 and #127
1 parent b85d9d2 commit 9f60279

File tree

1 file changed

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

1 file changed

+4
-3
lines changed

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

+4-3
Original file line numberDiff line numberDiff line change
@@ -663,9 +663,10 @@ public void setVisible (boolean visible) {
663663
*/
664664
public static void win32_setHeight(Caret caret, int height) {
665665
caret.checkWidget();
666-
if(caret.height == height && caret.isCurrentCaret()) return;
667-
caret.height = height;
668-
caret.resized = true;
666+
if(caret.height != height) {
667+
caret.height = height;
668+
caret.resized = true;
669+
}
669670
if(caret.isVisible && caret.hasFocus()) caret.resize();
670671
}
671672

0 commit comments

Comments
 (0)