Alexandre Julliard : user32: Pass a NULL rectangle in the ClipCursor entry point when clipping is reset because of focus change .

Alexandre Julliard julliard at winehq.org
Fri Apr 22 12:27:43 CDT 2011


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri Apr 22 15:22:07 2011 +0200

user32: Pass a NULL rectangle in the ClipCursor entry point when clipping is reset because of focus change.

---

 dlls/user32/message.c |   12 +++++++-----
 server/queue.c        |    4 ++--
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/dlls/user32/message.c b/dlls/user32/message.c
index 51691ab..7661e3e 100644
--- a/dlls/user32/message.c
+++ b/dlls/user32/message.c
@@ -1870,11 +1870,13 @@ static LRESULT handle_internal_message( HWND hwnd, UINT msg, WPARAM wparam, LPAR
         return call_current_hook( h_extra->handle, HC_ACTION, wparam, h_extra->lparam );
     }
     case WM_WINE_CLIPCURSOR:
-    {
-        RECT rect;
-        GetClipCursor( &rect );
-        return USER_Driver->pClipCursor( &rect );
-    }
+        if (wparam)
+        {
+            RECT rect;
+            GetClipCursor( &rect );
+            return USER_Driver->pClipCursor( &rect );
+        }
+        return USER_Driver->pClipCursor( NULL );
     default:
         if (msg >= WM_WINE_FIRST_DRIVER_MSG && msg <= WM_WINE_LAST_DRIVER_MSG)
             return USER_Driver->pWindowMessage( hwnd, msg, wparam, lparam );
diff --git a/server/queue.c b/server/queue.c
index 91fe1fc..8bf2336 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -354,9 +354,9 @@ static void set_clip_rectangle( struct desktop *desktop, const rectangle_t *rect
 
     get_top_window_rectangle( desktop, &top_rect );
     if (!rect || !intersect_rect( &new_rect, &top_rect, rect )) new_rect = top_rect;
-    if (!memcmp( &desktop->cursor.clip, &new_rect, sizeof(new_rect) )) return;
     desktop->cursor.clip = new_rect;
-    if (desktop->cursor.clip_msg) post_desktop_message( desktop, desktop->cursor.clip_msg, 0, 0 );
+    if (desktop->cursor.clip_msg)
+        post_desktop_message( desktop, desktop->cursor.clip_msg, rect != NULL, 0 );
 
     /* warp the mouse to be inside the clip rect */
     x = min( max( desktop->cursor.x, desktop->cursor.clip.left ), desktop->cursor.clip.right-1 );




More information about the wine-cvs mailing list