Alexandre Julliard : user32: Make sure the driver CreateCursorIcon() entry point is always called.

Alexandre Julliard julliard at winehq.org
Fri Oct 8 12:38:07 CDT 2010


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri Oct  8 11:23:08 2010 +0200

user32: Make sure the driver CreateCursorIcon() entry point is always called.

---

 dlls/user32/cursoricon.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/dlls/user32/cursoricon.c b/dlls/user32/cursoricon.c
index 42bba6d..ce25a9d 100644
--- a/dlls/user32/cursoricon.c
+++ b/dlls/user32/cursoricon.c
@@ -940,7 +940,6 @@ static HICON CURSORICON_CreateIconFromBMI( BITMAPINFO *bmi,
         info->frames[0].mask  = mask;
         info->frames[0].alpha = alpha;
         release_icon_ptr( hObj, info );
-        USER_Driver->pCreateCursorIcon( hObj );
     }
     else
     {
@@ -1184,6 +1183,7 @@ HICON WINAPI CreateIconFromResourceEx( LPBYTE bits, UINT cbSize,
 {
     POINT hotspot;
     BITMAPINFO *bmi;
+    HICON icon;
 
     TRACE_(cursor)("%p (%u bytes), ver %08x, %ix%i %s %s\n",
                    bits, cbSize, dwVersion, width, height,
@@ -1205,8 +1205,10 @@ HICON WINAPI CreateIconFromResourceEx( LPBYTE bits, UINT cbSize,
         bmi = (BITMAPINFO *)(pt + 2);
     }
 
-    return CURSORICON_CreateIconFromBMI( bmi, hotspot, bIcon, dwVersion,
+    icon = CURSORICON_CreateIconFromBMI( bmi, hotspot, bIcon, dwVersion,
 					 width, height, cFlag );
+    if (icon) USER_Driver->pCreateCursorIcon( icon );
+    return icon;
 }
 
 
@@ -1274,6 +1276,7 @@ static HICON CURSORICON_LoadFromFile( LPCWSTR filename,
 end:
     TRACE("loaded %s -> %p\n", debugstr_w( filename ), hIcon );
     UnmapViewOfFile( bits );
+    if (hIcon) USER_Driver->pCreateCursorIcon( hIcon );
     return hIcon;
 }
 




More information about the wine-cvs mailing list