devdraw: fix mouse warping with multi-monitor on OS X
R=rsc CC=plan9port.codebot http://codereview.appspot.com/5748043
This commit is contained in:
parent
4a000a28d3
commit
1f4c574440
1 changed files with 3 additions and 3 deletions
|
|
@ -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));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue