Module: wine Branch: master Commit: 9726a7119b61aae27c6b9cd8a92354a0f989de18 URL: http://source.winehq.org/git/wine.git/?a=commit;h=9726a7119b61aae27c6b9cd8a9...
Author: Andrew Riedi andrewriedi@gmail.com Date: Sun Nov 23 17:07:34 2008 -0800
user32: Make the hotspot ICON_HOTSPOT when loading icons.
Based on patches by Henri Verbeet.
---
dlls/user32/cursoricon.c | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/dlls/user32/cursoricon.c b/dlls/user32/cursoricon.c index 26676de..655a74a 100644 --- a/dlls/user32/cursoricon.c +++ b/dlls/user32/cursoricon.c @@ -1124,8 +1124,17 @@ static HICON CURSORICON_LoadFromFile( LPCWSTR filename, if ( entry->dwDIBOffset + entry->dwDIBSize > filesize ) goto end;
- hotspot.x = entry->xHotspot; - hotspot.y = entry->yHotspot; + /* Set the actual hotspot for cursors and ICON_HOTSPOT for icons. */ + if ( fCursor ) + { + hotspot.x = entry->xHotspot; + hotspot.y = entry->yHotspot; + } + else + { + hotspot.x = ICON_HOTSPOT; + hotspot.y = ICON_HOTSPOT; + } hIcon = CURSORICON_CreateIconFromBMI( (BITMAPINFO *)&bits[entry->dwDIBOffset], hotspot, !fCursor, 0x00030000, width, height, loadflags );