old patch enabling visible icons in some applications

trueflyingsheep at googlemail.com trueflyingsheep at googlemail.com
Sat Aug 8 08:48:58 CDT 2009


i have found an old patch in some mailing list here which is essential for some applications to be useable.
without it they have no icons on their otherwise empty buttons, wich is not funny.

the error probably fixed by this patch is:
fixme:xrender:X11DRV_AlphaBlend Ignoring SourceConstantAlpha 64 for AC_SRC_ALPHA

why didn't it make it into the release?

diff --git http://a/dlls/winex11.drv/xrender.c http://b/dlls/winex11.drv/xrender.c
index 554ce25..d85110c 100644
--- http://a/dlls/winex11.drv/xrender.c
+++ http://b/dlls/winex11.drv/xrender.c
@@ -1581,8 +1581,6 @@ BOOL X11DRV_AlphaBlend(X11DRV_PDEVICE *devDst, INT xDst, INT yDst, INT widthDst,
return FALSE;
}

- if ((blendfn.AlphaFormat & AC_SRC_ALPHA) && blendfn.SourceConstantAlpha != 0xff)
- FIXME("Ignoring SourceConstantAlpha %d for AC_SRC_ALPHA\n", blendfn.SourceConstantAlpha);

if(dib.dsBm.bmBitsPixel != 32) {
FIXME("not a 32 bpp dibsection\n");
@@ -1608,6 +1606,20 @@ BOOL X11DRV_AlphaBlend(X11DRV_PDEVICE *devDst, INT xDst, INT yDst, INT widthDst,
{
memcpy(dstbits, (char *)dib.dsBm.bmBits + y * dib.dsBm.bmWidthBytes + xSrc * 4,
widthSrc * 4);
+
+ if (blendfn.SourceConstantAlpha != 0xff) {
+ BYTE *tmpBits = dstbits;
+ int x,y;
+ for (x = 0; x < widthSrc; x++, tmpBits += 4)
+ for(y=0;y<4;y++)
+ tmpBits[y] = tmpBits[y] * blendfn.SourceConstantAlpha / 255; 
+ }
dstbits += (top_down ? -1 : 1) * widthSrc;
}
}

i attached a screenshot showing the application after the buttons are hovered (most icons disappear after the first hover, some after loading the app)
under the writing “History” should be 5 icons…
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 437 bytes
Desc: OpenPGP digital signature
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20090808/47f9c528/attachment-0001.pgp>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20090808/47f9c528/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: regexbuddy.png
Type: image/png
Size: 53466 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20090808/47f9c528/attachment-0001.png>


More information about the wine-patches mailing list