[PATCH] Fix issue on showing mouse pointer on Mouse Prop Dlg

zecarlos jesus zecarlos1957 at hotmail.com
Fri May 22 01:26:32 CDT 2020


[PATCH] Fix issue on showing mouse pointer on Mouse Prop Dlg

static BOOL get_icon_size( HICON handle, SIZE *size )
{
    ICONINFO info;
    BITMAP bmp;
    int ret;

    if (!GetIconInfo(handle, &info))
        return FALSE;

-     ret = GetObjectW(info.hbmColor, sizeof(bmp), &bmp);
+    ret = GetObjectW(info.hbmMask, sizeof(bmp), &bmp);

  if (ret)
    {
        size->cx = bmp.bmWidth;
        size->cy = bmp.bmHeight;
+        /*
+           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 == 0)
+            size->cy = (size->cy >> 1);
    }

    DeleteObject(info.hbmMask);
    DeleteObject(info.hbmColor);

    return !!ret;
}

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20200522/fef411e0/attachment-0001.htm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: static.c
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20200522/fef411e0/attachment-0001.c>


More information about the wine-devel mailing list