From 982cd944a4cdf3e96f0c6ebbb97347de1b1c6279 Mon Sep 17 00:00:00 2001 From: Mitchell Stokes Date: Tue, 15 Jun 2010 17:12:21 +0000 Subject: [PATCH] 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. --- intern/ghost/intern/GHOST_SystemWin32.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp index 76ce7703c06..91c1927f8e7 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.cpp +++ b/intern/ghost/intern/GHOST_SystemWin32.cpp @@ -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; }