summaryrefslogtreecommitdiffstats
path: root/bundles
diff options
context:
space:
mode:
authorCarolyn MacLeod <Carolyn_MacLeod@ca.ibm.com>2012-05-10 16:10:34 -0400
committerCarolyn MacLeod <Carolyn_MacLeod@ca.ibm.com>2012-05-11 11:22:09 -0400
commit08023166d27db1ceaf0070e5d368a2aa472bbe85 (patch)
treeed51ad07d81821996cd5b0740cb2366c1adc1dc7 /bundles
parentce08bf8432b0c12068b9bd180b3182348aa5feb8 (diff)
downloadeclipse.platform.swt-08023166d27db1ceaf0070e5d368a2aa472bbe85.tar.gz
eclipse.platform.swt-08023166d27db1ceaf0070e5d368a2aa472bbe85.tar.xz
eclipse.platform.swt-08023166d27db1ceaf0070e5d368a2aa472bbe85.zip
Bug 44072 - API Request: Combo#getCaretLocation()
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Combo.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Combo.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Combo.java
index fb63667959..2475ceea24 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Combo.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Combo.java
@@ -620,7 +620,11 @@ public Point getCaretLocation() {
int /*long*/ pArray = layoutManager.rectArrayForCharacterRange(range, range, container, rectCount);
NSRect rect = new NSRect();
if (rectCount[0] > 0) OS.memmove(rect, pArray, NSRect.sizeof);
- return new Point((int)rect.x, (int)rect.y);
+ NSPoint pt = new NSPoint();
+ pt.x = (int)rect.x;
+ pt.y = (int)rect.y;
+ pt = widget.convertPoint_toView_(pt, view);
+ return new Point((int)pt.x, (int)pt.y);
}
int getCharCount() {