diff options
author | David Jeannot <djeannot24@gmail.com> | 2012-03-05 21:14:34 -0500 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2012-03-05 21:14:34 -0500 |
commit | 1f4c5744402856329d9a2cb5bd982462041329b5 (patch) | |
tree | 673c07f3d22be2ef333de5cb1cbe29b8ebfc5c0c | |
parent | 4a000a28d30ea9a7df06088bcd4bed0ab431f0ad (diff) | |
download | plan9port-1f4c5744402856329d9a2cb5bd982462041329b5.tar.gz plan9port-1f4c5744402856329d9a2cb5bd982462041329b5.tar.bz2 plan9port-1f4c5744402856329d9a2cb5bd982462041329b5.zip |
devdraw: fix mouse warping with multi-monitor on OS X
R=rsc
CC=plan9port.codebot
http://codereview.appspot.com/5748043
-rw-r--r-- | src/cmd/devdraw/cocoa-screen.m | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cmd/devdraw/cocoa-screen.m b/src/cmd/devdraw/cocoa-screen.m index 9cc0e134..81ee0398 100644 --- a/src/cmd/devdraw/cocoa-screen.m +++ b/src/cmd/devdraw/cocoa-screen.m @@ -1035,11 +1035,11 @@ setmouse(Point p) in.mpos = NSMakePoint(p.x, p.y); // race condition - r = [[WIN screen] frame]; - q = [win.content convertPoint:in.mpos toView:nil]; q = [WIN convertBaseToScreen:q]; - q.y = r.size.height - q.y; + + r = [[[NSScreen screens] objectAtIndex:0] frame]; + q.y = r.size.height - q.y; /* Quartz is top-left-based here */ CGWarpMouseCursorPosition(NSPointToCGPoint(q)); } |