Thanks Tatsuhiro, fix merged and submitted to svn trunk.

On Mon, Dec 15, 2008 at 6:20 PM, Tatsuhiro Nishioka
<[email protected]> wrote:
> Hi,
>
> 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.
>
> FYI, the diff for the file is as follows, and the fix is very simple.
>
> --- GraphicsWindowCarbon.cpp    (revision 9335)
> +++ GraphicsWindowCarbon.cpp    (working copy)
> @@ -1271,8 +1271,8 @@
>     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);
>
>
>
>
>
>
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to