summaryrefslogtreecommitdiff
path: root/indra/llwindow/llwindowmacosx-objc.mm
diff options
context:
space:
mode:
authorGeenz <geenz@geenzo.com>2013-03-25 05:26:55 -0400
committerGeenz <geenz@geenzo.com>2013-03-25 05:26:55 -0400
commit258b77b64777a5ce5fef0ef066aa52b34b43ba65 (patch)
treea36e8ecdea32a932c74dde044336014f63368d7a /indra/llwindow/llwindowmacosx-objc.mm
parent6c200a94f705667201bcaf0753986da90a2748eb (diff)
Additional IME support. LLPreeditor is largely good to go at this point, but there's still some work to do in getSegments.
Diffstat (limited to 'indra/llwindow/llwindowmacosx-objc.mm')
-rw-r--r--indra/llwindow/llwindowmacosx-objc.mm45
1 files changed, 39 insertions, 6 deletions
diff --git a/indra/llwindow/llwindowmacosx-objc.mm b/indra/llwindow/llwindowmacosx-objc.mm
index 9530785b83..1a0647485c 100644
--- a/indra/llwindow/llwindowmacosx-objc.mm
+++ b/indra/llwindow/llwindowmacosx-objc.mm
@@ -119,6 +119,7 @@ CursorRef createImageCursor(const char *fullpath, int hotspotX, int hotspotY)
void setArrowCursor()
{
NSCursor *cursor = [NSCursor arrowCursor];
+ [NSCursor unhide];
[cursor set];
}
@@ -290,12 +291,44 @@ void makeWindowOrderFront(NSWindowRef window)
void convertScreenToWindow(NSWindowRef window, float *coord)
{
- NSPoint point;
- point.x = coord[0];
- point.y = coord[1];
- point = [(LLNSWindow*)window convertScreenToBase:point];
- coord[0] = point.x;
- coord[1] = point.y;
+ NSRect point;
+ point.origin.x = coord[0];
+ point.origin.y = coord[1];
+ point = [(LLNSWindow*)window convertRectFromScreen:point];
+ coord[0] = point.origin.x;
+ coord[1] = point.origin.y;
+}
+
+void convertRectToScreen(NSWindowRef window, float *coord)
+{
+ NSRect point;
+ point.origin.x = coord[0];
+ point.origin.y = coord[1];
+ point.size.width = coord[2];
+ point.size.height = coord[3];
+
+ point = [(LLNSWindow*)window convertRectToScreen:point];
+
+ coord[0] = point.origin.x;
+ coord[1] = point.origin.y;
+ coord[2] = point.size.width;
+ coord[3] = point.size.height;
+}
+
+void convertRectFromScreen(NSWindowRef window, float *coord)
+{
+ NSRect point;
+ point.origin.x = coord[0];
+ point.origin.y = coord[1];
+ point.size.width = coord[2];
+ point.size.height = coord[3];
+
+ point = [(LLNSWindow*)window convertRectFromScreen:point];
+
+ coord[0] = point.origin.x;
+ coord[1] = point.origin.y;
+ coord[2] = point.size.width;
+ coord[3] = point.size.height;
}
void convertScreenToView(NSWindowRef window, float *coord)