Fix 'moldy' application icon image

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/branches/gnustep_testplant_branch@37854 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Marcian Lytwyn 2014-05-07 20:45:54 +00:00
parent e9c150207b
commit 0e941b80a5

View file

@ -149,7 +149,7 @@ static NSBitmapImageRep *getStandardBitmap(NSImage *image)
hasAlpha: [rep hasAlpha] hasAlpha: [rep hasAlpha]
isPlanar: NO isPlanar: NO
colorSpaceName: NSCalibratedRGBColorSpace colorSpaceName: NSCalibratedRGBColorSpace
bitmapFormat: 0 bitmapFormat: NSAlphaNonpremultipliedBitmapFormat
bytesPerRow: 0 bytesPerRow: 0
bitsPerPixel: 0]; bitsPerPixel: 0];
} }
@ -1912,28 +1912,14 @@ _get_next_prop_new_event(Display *display, XEvent *event, char *arg)
// blue // blue
B = d[2]; B = d[2];
// alpha // alpha
#if 0
/*
For unclear reasons the alpha handling does not work, so we simulate it.
*/
if (samples == 4) if (samples == 4)
{ {
A = d[4]; A = d[3];
} }
else else
{ {
A = 255; A = 255;
} }
#else
if (R || G || B)
{
A = 255;
}
else
{
A = 0;
}
#endif
iconPropertyData[index++] = A << 24 | R << 16 | G << 8 | B; iconPropertyData[index++] = A << 24 | R << 16 | G << 8 | B;
d += samples; d += samples;