Alex Henrie : user32: Do not return the class icon when ICON_SMALL2 is requested.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed May 13 10:25:31 CDT 2015
Module: wine
Branch: master
Commit: f2bf0227a25859f3dfabc80c53f33cd94b732471
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f2bf0227a25859f3dfabc80c53f33cd94b732471
Author: Alex Henrie <alexhenrie24 at gmail.com>
Date: Wed May 13 00:33:11 2015 -0600
user32: Do not return the class icon when ICON_SMALL2 is requested.
---
dlls/user32/defwnd.c | 2 --
dlls/user32/tests/class.c | 7 +++++++
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/dlls/user32/defwnd.c b/dlls/user32/defwnd.c
index bcd6f91..fa6b0fa 100644
--- a/dlls/user32/defwnd.c
+++ b/dlls/user32/defwnd.c
@@ -640,8 +640,6 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
break;
case ICON_SMALL2:
ret = wndPtr->hIconSmall;
- if (!ret) ret = (HICON)GetClassLongPtrW( hwnd, GCLP_HICONSM );
- /* FIXME: should have a default here if class icon is null */
break;
default:
ret = 0;
diff --git a/dlls/user32/tests/class.c b/dlls/user32/tests/class.c
index b5adac4..14f0aa3 100644
--- a/dlls/user32/tests/class.c
+++ b/dlls/user32/tests/class.c
@@ -1002,6 +1002,13 @@ static void test_icons(void)
hsmicon = (HICON)GetClassLongPtrW(hwnd, GCLP_HICONSM);
ok(hsmicon != NULL, "GetClassLong should return non-zero handle\n");
+ ok(SendMessageA(hwnd, WM_GETICON, ICON_BIG, 0) == 0,
+ "WM_GETICON with ICON_BIG should not return the class icon\n");
+ ok(SendMessageA(hwnd, WM_GETICON, ICON_SMALL, 0) == 0,
+ "WM_GETICON with ICON_SMALL should not return the class icon\n");
+ ok(SendMessageA(hwnd, WM_GETICON, ICON_SMALL2, 0) == 0,
+ "WM_GETICON with ICON_SMALL2 should not return the class icon\n");
+
hsmallnew = CopyImage(wcex.hIcon, IMAGE_ICON, GetSystemMetrics(SM_CXSMICON),
GetSystemMetrics(SM_CYSMICON), 0);
ok(!SetClassLongPtrW(hwnd, GCLP_HICONSM, (LONG_PTR)hsmallnew),
More information about the wine-cvs
mailing list