From Adndre Garneau, "Attached is a fix to prevent a cursor being shown in graphics windows when

traits specify that none should be used (a recent change forced a
left-pointer cursor as the default). "
This commit is contained in:
Robert Osfield
2007-07-05 10:57:34 +00:00
parent 70bbb06dd5
commit 0434d29ad4

View File

@@ -970,7 +970,7 @@ GraphicsWindowWin32::GraphicsWindowWin32( osg::GraphicsContext::Traits* traits )
_destroying(false)
{
_traits = traits;
setCursor( LeftArrowCursor);
if (_traits->useCursor) setCursor(LeftArrowCursor);
init();
@@ -1722,9 +1722,8 @@ void GraphicsWindowWin32::requestWarpPointer( float x, float y )
return;
}
RECT windowRect;
#if 0
RECT windowRect;
if (!::GetWindowRect(_hwnd, &windowRect))
{
reportErrorForScreen("GraphicsWindowWin32::requestWarpPointer() - Unable to get window rectangle", _traits->screenNum, ::GetLastError());
@@ -1735,7 +1734,7 @@ void GraphicsWindowWin32::requestWarpPointer( float x, float y )
{
reportErrorForScreen("GraphicsWindowWin32::requestWarpPointer() - Unable to set cursor position", _traits->screenNum, ::GetLastError());
return;
}
}
#else
// MIKEC: NEW CODE
POINT pt;
@@ -1752,7 +1751,7 @@ void GraphicsWindowWin32::requestWarpPointer( float x, float y )
return;
}
#endif
getEventQueue()->mouseWarped(x,y);
}