http://bugs.winehq.org/show_bug.cgi?id=18314
Summary: The Witcher: Launcher window invisible (taskbar enty appears) Product: Wine Version: unspecified Platform: Other OS/Version: other Status: UNCONFIRMED Severity: normal Priority: P2 Component: gdiplus AssignedTo: wine-bugs@winehq.org ReportedBy: peppe@bsnet.se
Created an attachment (id=20857) --> (http://bugs.winehq.org/attachment.cgi?id=20857) Test showing similar behaviour
Observation: Trying to run the launcher for The Witcher (1.4) an entry appear in the taskbar but no window appear. This is using built-in gdiplus. Using native gdiplus the window appear.
Investigation: Reading trace logs it becomes evident that when using wine's gdiplus the launcher calls CreateRectRgn(0, 0, 0, 0) and then nothing more of that kind. Ending up with a zero size window. While when using the native gdiplus there's quite a number of CreateRectRgn and CombineRgn following.
This happens after calls to GdipBitmapLockBits and GdipBitmapUnlockBits and the window shown when using the native gdiplus is shaped after the background image, so I assume that the pixel data returned is used to build the shape of the window.
Based on this assumption and the function calls seen in the traces I have build a small test which shows the same behaviour (attached).
Looking at my test I've noticed that I get different pixel formats reported when using native and builtin GdipCreateBitmapFromFile/GdipGetImagePixelFormat using a RGBA png image. Also, when requesting PixelFormat32bppARGB the pixeldata returned by GdipBitmapLockBits have an all zero alpha channel (i.e. the whole image is fully transparent). In my test this is the actual problem.
It is noted in a comment in the code that GdipBitmapLockBits does not fully consider format.