Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarolyn MacLeod2012-05-10 20:10:34 +0000
committerCarolyn MacLeod2012-05-10 20:12:43 +0000
commit3d319bbbc00ee30fbfb9fd29939fc23f4ca92c44 (patch)
tree30876b1d2b487765df7857a3d5a5e9d12d3463b5
parentd08715717c3d5cb4d9889b3ac92d5f6860fc6fc1 (diff)
downloadeclipse.platform.swt-3d319bbbc00ee30fbfb9fd29939fc23f4ca92c44.tar.gz
eclipse.platform.swt-3d319bbbc00ee30fbfb9fd29939fc23f4ca92c44.tar.xz
eclipse.platform.swt-3d319bbbc00ee30fbfb9fd29939fc23f4ca92c44.zip
Bug 44072 - API Request: Combo#getCaretLocation()
-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() {

Back to the top