From 0434d29ad44f8790c11a3a37b3c902de8e7dbc07 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 5 Jul 2007 10:57:34 +0000 Subject: [PATCH] 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). " --- src/osgViewer/GraphicsWindowWin32.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/osgViewer/GraphicsWindowWin32.cpp b/src/osgViewer/GraphicsWindowWin32.cpp index f476b4413..0b5f2c84c 100644 --- a/src/osgViewer/GraphicsWindowWin32.cpp +++ b/src/osgViewer/GraphicsWindowWin32.cpp @@ -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); }