Got the okay from Nathan to commit this: It's a small patch for Win32 Ghost that prevents a Blender window from setting the cursor position when it's not the active window.

This commit is contained in:
Mitchell Stokes
2010-06-15 17:12:21 +00:00
parent 927aac74ab
commit 982cd944a4

View File

@@ -271,6 +271,8 @@ GHOST_TSuccess GHOST_SystemWin32::getCursorPosition(GHOST_TInt32& x, GHOST_TInt3
GHOST_TSuccess GHOST_SystemWin32::setCursorPosition(GHOST_TInt32 x, GHOST_TInt32 y)
{
if (!GetActiveWindow())
return GHOST_kFailure;
return ::SetCursorPos(x, y) == TRUE ? GHOST_kSuccess : GHOST_kFailure;
}