[3/3] winex11.drv: Make wglMakeCurrent return the correct error when the drawable is invalid.

Matteo Bruni matteo.mystral at gmail.com
Tue Mar 29 11:58:24 CDT 2011

2011/3/29 Roderick Colenbrander <thunderbird2k at gmail.com>:
> The fact that a pixel format is not set on the physDev doesn't
> necessarily mean it is invalid, it just means SetPixelFormat wasn't
> called on it. Though slightly earlier in wglMakeCurrent we already
> catch that situation when compare the pixel format of the context and
> the hdc.

True, but as you say the check I'm adding doesn't really change the
behavior outside of a different SetLastError() call. Maybe the WARN
message I'm adding could be improved.

> Is there not something better for which we could check? Is the
> drawable of the physDev perhaps something to check for? (I have no
> idea in what state the physDev is after a destroy window; should we be
> able to enter x11drv at all? perhaps this should be handled inside the
> gdi32 code, just a thought)

Checking for the drawable or any other field in the physDev doesn't
seem to be really better. I'm not sure about the feasibility of
handling that on the gdi32 side, I think I gave it a try at some point
but then I resorted to this other approach. But, of course, I may be
failing to see a better solution ;)

> Roderick
> On Tue, Mar 29, 2011 at 7:42 AM, Matteo Bruni <matteo.mystral at gmail.com> wrote:

More information about the wine-devel mailing list