[PATCH] gdi32: Allow any mode passed to SetBkMode().

Jeff Smith whydoubt at gmail.com
Wed Oct 7 10:34:17 CDT 2020


On Wed, Oct 7, 2020 at 2:24 AM Huw Davies <huw at codeweavers.com> wrote:
>
> On Tue, Oct 06, 2020 at 11:22:29PM -0500, Jeff Smith wrote:
> > Signed-off-by: Jeff Smith <whydoubt at gmail.com>
> > ---
> > Testing revealed that SetBkMode() does not treat 'invalid' values as one
> > might assume.  Discovered this when working on another issue.  Note that
> > fixing this to match Windows simplifies one of the tests for that bug.
>
> Which then begs the question: How should these invalid modes be
> treated visually?

FWIW, testing In Windows points to the default being transparent.
That implies that any wine code that checks this value should check
for equality/non-equality with OPAQUE to be "safe".

> Since there doesn't appear to be a real application that
> depends on this, we should keep things as they are.

Would be nice (and removes 8 unnecessary lines of code), but no
real harm in leaving it as it is.

Thanks,
Jeff



More information about the wine-devel mailing list