[PATCH (try 2) 1/3] user32: Do not return the class icon when ICON_SMALL2 is requested.
Alex Henrie
alexhenrie24 at gmail.com
Wed May 13 01:33:11 CDT 2015
---
dlls/user32/defwnd.c | 1 -
dlls/user32/tests/class.c | 7 +++++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/dlls/user32/defwnd.c b/dlls/user32/defwnd.c
index bcd6f91..02a2f23 100644
--- a/dlls/user32/defwnd.c
+++ b/dlls/user32/defwnd.c
@@ -640,7 +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:
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),
--
2.4.0
More information about the wine-patches
mailing list