[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: [3/3] winex11.drv: Make wglMakeCurrent return the correct error
From:       Roderick Colenbrander <thunderbird2k () gmail ! com>
Date:       2011-03-29 18:56:33
Message-ID: AANLkTinYKZJ8iz8YX2D2nRbO5LWjm5vDWp6ow4jjKUc= () mail ! gmail ! com
[Download RAW message or body]

On Tue, Mar 29, 2011 at 5:58 PM, Matteo Bruni <matteo.mystral@gmail.com> wrote:
> 2011/3/29 Roderick Colenbrander <thunderbird2k@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@gmail.com> wrote:
>>>
>

I would vote for a more correct way of checking whether we are dealing
with an invalid drawable. Perhaps Alexandre has a good suggestion.

Roderick


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic