Alexandre Julliard : dinput: Catch unsuccessful clipping attempts and fall back to warping.

Alexandre Julliard julliard at winehq.org
Mon Jan 30 14:05:58 CST 2012


Module: wine
Branch: master
Commit: b0657c8623e7ed8745ffb87b3ed47afb55589bc3
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=b0657c8623e7ed8745ffb87b3ed47afb55589bc3

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Jan 30 17:46:23 2012 +0100

dinput: Catch unsuccessful clipping attempts and fall back to warping.

---

 dlls/dinput/mouse.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/dlls/dinput/mouse.c b/dlls/dinput/mouse.c
index 20de328..ead6c25 100644
--- a/dlls/dinput/mouse.c
+++ b/dlls/dinput/mouse.c
@@ -421,7 +421,7 @@ static void warp_check( SysMouseImpl* This, BOOL force )
 
     if (force || (This->need_warp && (now - This->last_warped > interval)))
     {
-        RECT rect;
+        RECT rect, new_rect;
         POINT mapped_center;
 
         This->last_warped = now;
@@ -442,7 +442,8 @@ static void warp_check( SysMouseImpl* This, BOOL force )
             rect.right = min( rect.right, rect.left + GetSystemMetrics( SM_CXVIRTUALSCREEN ) - 2 );
             rect.bottom = min( rect.bottom, rect.top + GetSystemMetrics( SM_CYVIRTUALSCREEN ) - 2 );
             TRACE("Clipping mouse to %s\n", wine_dbgstr_rect( &rect ));
-            This->clipped = ClipCursor( &rect );
+            ClipCursor( &rect );
+            This->clipped = GetClipCursor( &new_rect ) && EqualRect( &rect, &new_rect );
         }
     }
 }




More information about the wine-cvs mailing list