CreateBrushIndirect under Wine currently returns stock brushes if the brush requested matches the color. In gdi/brush.c the following comment is made: /* If a solid brush is created in a color matching one of the * stock brushes, native returns the stock object (GDI heap * optimisation). Some apps rely on this as they otherwise * would leak their brushes. */
However under both Windows 95 and Windows XP this does not seem to be the case. Under Windows, the following holds true, but fails under Wine GetStockObject(BLACK_BRUSH) != CreateSolidBrush(RGB(0,0,0))
This issue currently breaks applications making calls to SetSysColors as stock brushes are deleted as the new colors are added.
Does anyone know why this was setup in this way? Or which version of Windows that exhibits the behavior mentioned in the comment?
-Kevin
[...]
However under both Windows 95 and Windows XP this does not seem to be the case. Under Windows, the following holds true, but fails under Wine GetStockObject(BLACK_BRUSH) != CreateSolidBrush(RGB(0,0,0))
This issue currently breaks applications making calls to SetSysColors as stock brushes are deleted as the new colors are added.
Does anyone know why this was setup in this way? Or which version of Windows that exhibits the behavior mentioned in the comment?
I presume it might have been something from win16 times?
Cheers, Kuba Ober