mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 09:50:02 +00:00
[0.4.10][COMCTL32] Fix regression on showing current mouse pointer in main.cpl (#2829)
GetIconInfo() fill info.hbmColor with NULL HBITMAP handle on black/white bitmaps. CORE-17062 It broke by 0.4.9-dev-719-gb3fb8555bf
fix is squashed port of 2 commits: 0.4.15-dev-534-g887764e607
(fix) 0.4.15-dev-2705-ga3cadf630a
(nitpick)
This commit is contained in:
parent
404371f856
commit
2a611b6588
1 changed files with 13 additions and 0 deletions
|
@ -94,11 +94,24 @@ static BOOL get_icon_size( HICON handle, SIZE *size )
|
||||||
if (!GetIconInfo(handle, &info))
|
if (!GetIconInfo(handle, &info))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
ret = GetObjectW(info.hbmMask, sizeof(bmp), &bmp);
|
||||||
|
#else
|
||||||
ret = GetObjectW(info.hbmColor, sizeof(bmp), &bmp);
|
ret = GetObjectW(info.hbmColor, sizeof(bmp), &bmp);
|
||||||
|
#endif
|
||||||
if (ret)
|
if (ret)
|
||||||
{
|
{
|
||||||
size->cx = bmp.bmWidth;
|
size->cx = bmp.bmWidth;
|
||||||
size->cy = bmp.bmHeight;
|
size->cy = bmp.bmHeight;
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
/*
|
||||||
|
If this structure defines a black and white icon, this bitmask is formatted
|
||||||
|
so that the upper half is the icon AND bitmask and the lower half is
|
||||||
|
the icon XOR bitmask.
|
||||||
|
*/
|
||||||
|
if (!info.hbmColor)
|
||||||
|
size->cy /= 2;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
DeleteObject(info.hbmMask);
|
DeleteObject(info.hbmMask);
|
||||||
|
|
Loading…
Reference in a new issue