Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java
index 582f39e972..82f9cd545d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java
@@ -940,6 +940,12 @@ public int getCaretLineNumber () {
* </ul>
*/
public Point getCaretLocation () {
+ return DPIUtil.autoScaleDown(getCaretLocationInPixels());
+}
+/**
+* @noreference This method is not intended to be referenced by clients.
+*/
+public Point getCaretLocationInPixels () {
checkWidget ();
/*
* Bug in Windows. For some reason, Windows is unable
@@ -2499,7 +2505,7 @@ int untranslateOffset (int offset) {
@Override
void updateMenuLocation (Event event) {
- Point point = display.mapInPixels (this, null, getCaretLocation ());
+ Point point = display.mapInPixels (this, null, getCaretLocationInPixels ());
event.x = point.x;
event.y = point.y + getLineHeightInPixels ();
}

Back to the top