From Tatsuhiro Nishioka, "I found a bug in GraphicsWindowCarbon.
GraphicsWindowCarbon::requestWarpPointer() places the mouse pointer in a (global?) display coordination, but it must be in a local window coordination. This problem is critical because the mouse cursor can go off a window especially when you place the window on the secondary screen. Attached is the file to fix this problem. I tested this modified file with the following situations (on FlightGear) and all works fine. - two windows on two screens (each has one window). - two windows on two screens (secondary screen has all windows). - two windows on two screens (primary screen has all windows). In all scenarios, warp requests (by right-click the mouse) successfully moves the mouse pointer to the center of the main window, and it is what it's supposed to be in the flightgear."
This commit is contained in:
@@ -1271,8 +1271,8 @@ void GraphicsWindowCarbon::requestWarpPointer(float x,float y)
|
||||
CGDirectDisplayID displayId = wsi->getDisplayID((*_traits));
|
||||
|
||||
CGPoint point;
|
||||
point.x = x;
|
||||
point.y = y;
|
||||
point.x = x + _traits->x;
|
||||
point.y = y + _traits->y;
|
||||
CGDisplayMoveCursorToPoint(displayId, point);
|
||||
|
||||
getEventQueue()->mouseWarped(x,y);
|
||||
|
||||
Reference in New Issue
Block a user