diff options
author | Carolyn MacLeod <Carolyn_MacLeod@ca.ibm.com> | 2012-05-10 16:10:34 -0400 |
---|---|---|
committer | Carolyn MacLeod <Carolyn_MacLeod@ca.ibm.com> | 2012-05-10 16:12:43 -0400 |
commit | 3d319bbbc00ee30fbfb9fd29939fc23f4ca92c44 (patch) | |
tree | 30876b1d2b487765df7857a3d5a5e9d12d3463b5 /bundles | |
parent | d08715717c3d5cb4d9889b3ac92d5f6860fc6fc1 (diff) | |
download | eclipse.platform.swt-3d319bbbc00ee30fbfb9fd29939fc23f4ca92c44.tar.gz eclipse.platform.swt-3d319bbbc00ee30fbfb9fd29939fc23f4ca92c44.tar.xz eclipse.platform.swt-3d319bbbc00ee30fbfb9fd29939fc23f4ca92c44.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.java | 6 |
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() { |