From Thibault Genessay, "On Windows, when setting a cursor through
osgViewer::GraphicsWindow::setCursor() the new cursor type is recorded but not applied until windows sends another WM_SETCURSOR message. This delays the application of the cursor to the next mouse event. The attached file fixes this by setting the new cursor with a call to ::SetCursor() immediately. "
This commit is contained in:
@@ -1847,6 +1847,9 @@ void GraphicsWindowWin32::setCursor( MouseCursor mouseCursor )
|
||||
|
||||
_currentCursor = newCursor;
|
||||
_traits->useCursor = (_currentCursor != NULL);
|
||||
|
||||
if (_mouseCursor != InheritCursor)
|
||||
::SetCursor(_currentCursor);
|
||||
}
|
||||
|
||||
HCURSOR GraphicsWindowWin32::getOrCreateCursor(MouseCursor mouseCursor)
|
||||
|
||||
Reference in New Issue
Block a user