Anonymous Meerkat meerkatanonymous@gmail.com wrote:
For that particular bug report just making DwmIsCompositionEnabled() return TRUE is enough according to the bug comments
The problem is that doing this might break other applications, since DWM is currently not fully implemented in Wine. Adding a registry value that is disabled by default more closely mirrors the way Windows does it (Windows uses this registry value to determine whether to enable composition or not), and will hopefully prevent regressions as well. Even if it's enabled by default, I believe using a registry value would still allow greater flexibility for the end-user if an error results due to this being enabled.
Adding a winecfg option to reflect that registry value could make things for a user much easier.
Besides, reading a DWORD value from the registry could be done in less lines of code and without passing not initialzied values to the registry APIs.
Unfortunately I'm not very familiar with Windows's API, and this is my first patch, so I'm not very familiar with Wine's codebase either. Could you share an example, or another function in Wine's code that implements this in a better way?
Here is an example: https://source.winehq.org/git/wine.git/blob/HEAD:/dlls/gdi32/gdiobj.c#l610