Author: jimtabor
Date: Tue Nov 22 04:46:58 2016
New Revision: 73334
URL: http://svn.reactos.org/svn/reactos?rev=73334&view=rev
Log:
[Win32SS]
- Patch by Katayama Hirofumi MZ : Improves NC_IconForWindow function. See CORE-12129.
Modified:
trunk/reactos/win32ss/user/ntuser/nonclient.c
Modified: trunk/reactos/win32ss/user/ntuser/nonclient.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/noncli…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/nonclient.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/nonclient.c [iso-8859-1] Tue Nov 22 04:46:58 2016
@@ -613,11 +613,6 @@
PCURICON_OBJECT pIcon = NULL;
HICON hIcon;
- //FIXME: Some callers use this function as if it returns a boolean saying "this window has an icon".
- //FIXME: Hence we must return a pointer with no reference count.
- //FIXME: This is bad and we should feel bad.
- //FIXME: Stop whining over wine code.
-
hIcon = UserGetProp(pWnd, gpsi->atomIconSmProp, TRUE);
if (!hIcon) hIcon = UserGetProp(pWnd, gpsi->atomIconProp, TRUE);
@@ -636,11 +631,9 @@
}
if (hIcon)
{
- pIcon = UserGetCurIconObject(hIcon);
- if (pIcon)
- {
- UserDereferenceObject(pIcon);
- }
+ pIcon = (PCURICON_OBJECT)UserGetObjectNoErr(gHandleTable,
+ hIcon,
+ TYPE_CURSOR);
}
return pIcon;
}