http://bugs.winehq.org/show_bug.cgi?id=7810
Summary: "err:x11drv:X11DRV_CreateBitmap Trying to make bitmap with planes=1, bpp=32" with a 24bit visual Product: Wine Version: 0.9.31. Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: wine-x11driver AssignedTo: wine-bugs@winehq.org ReportedBy: giuseppe.bilotta@gmail.com
When running The Bat version 3.x I get a long string of errors
err:x11drv:X11DRV_CreateBitmap Trying to make bitmap with planes=1, bpp=32
I'm running the stock Debian X.org 7.1.0-15 with the open source nVidia driver (nv) and the screen depth is 24 bit.
It is my understanding that the error line comes from line 124 of bitmap.c
http://source.winehq.org/source/dlls/winex11.drv/bitmap.c?v=wine-0.9.31#L124
and that the reason for the early warning is to prevent the call to XCreatePixmap (on line 143 of the same file) from failing due to depth mismatch.
However, screen_depth and allowed pixmap depths are not always the same, as shown by a call to xdpyinfo on my system:
number of supported pixmap formats: 7 supported pixmap formats: depth 1, bits_per_pixel 1, scanline_pad 32 depth 4, bits_per_pixel 8, scanline_pad 32 depth 8, bits_per_pixel 8, scanline_pad 32 depth 15, bits_per_pixel 16, scanline_pad 32 depth 16, bits_per_pixel 16, scanline_pad 32 depth 24, bits_per_pixel 32, scanline_pad 32 depth 32, bits_per_pixel 32, scanline_pad 32
Given that the relevant code hasn't changed in 0.9.33, I think the code is still valid.
The solution is probably to skip the explicit test for the bitmap depth on line 124 and rather check if XCreatePixmap generates some error after line 143. As an alternative, the bitmap depth should be checked against all the pixmap depth supported by the visual rather than just the monochrome and visual depth. But I think the 'check after XCreatePixmap' solution is better.
I'm sorry I've never done any Xlib programming ever, or I'd try and provide a patch myself.