https://bugs.winehq.org/show_bug.cgi?id=54888
Bug ID: 54888 Summary: Transparent window are displayed as black background window on wine Product: Wine Version: 8.6 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: bcjon07@gmail.com Distribution: ---
Some transparent windows are displayed as black background window. Here is a simple WPF window program that can reproduce this issue. On Windows, all parts are transparent except for the graphics and text in the middle, but it has a black background on Wine. It achieves transparency only by adding the following code to the window constructor (the main point is that WindowChrome is used instead of AllowTransparent): WindowStyle = WindowStyle.None; ResizeMode = ResizeMode.NoResize; Background = Brushes.Transparent; WindowChrome.SetWindowChrome(this, new WindowChrome { GlassFrameThickness = new Thickness(-1) });
Download link of the demo program: https://drive.google.com/file/d/1MCrnb1N6cLUzVoX_vO4tFO4qlS_qhAwi/view?usp=s...
Other clues: Transparent windows implemented using AllowTransparent are valid on Wine, while those implemented using WindowChrome are invalid. On Windows, transparent forms implemented using WindowChrome are frequently used due to better performance(usually). According to my pre investigation, AllowTransparent seems to be implemented using GDI, but WindowChrome mainly uses the DWM API
System architecture: x86_64 Ubuntu 20.04 wine 8.6 wine-mono 7.4.0