Fixing conflicts between WineD3D and WGL

Ken Thomases ken at codeweavers.com
Mon Apr 21 14:14:15 CDT 2014


On Apr 21, 2014, at 12:42 PM, Henri Verbeet wrote:

> On 21 April 2014 17:49, Ken Thomases <ken at codeweavers.com> wrote:
>> While implementing support for full-screen surfaces in the X11 driver, it became clear that I needed a reference to the wined3d device window or, more generally, the window for which the surface is a substitute.  This is necessary to manage focus since the full-screen window has to have X focus but the Win32 focus needs to remain with the device window.
>> 
>> Because of that, the function wglCreateSurfaceWINE() now takes a proxy window parameter.  This feels like an ugly kludge but I didn't find a cleaner alternative.  I'd be happy to discuss the X windowing issues that I feel lead to this requirement with anybody who may have better ideas.
>> 
> I'll admit to only having looked over the implementation very briefly
> so far, but are we quite sure we need a separate X window for this?

Good question.  It's not a slam dunk that we do.

We would at least need a separate X window as a child of the device window's whole_window.  This much would be just like how it works without my patches or for window surfaces with my patches.  We need that separate X window because any given surface may have a different pixel format, and thus X visual, from other surfaces or the Win32 window using normal WGL.  Likewise, the swap interval is a property of the drawable, so surfaces and the window should have separate drawables from each other.

After that, we'd need to alter the properties of the existing X window to decouple it from the Win32 properties so it can be a full-screen window without the undesirable changes to its Win32 styles, etc.  This might require even more invasive hooks into all of the existing window and event functions.  Or it might be cleaner.  (Certainly, it would be cleaner in terms of focus management.)

It's worth investigating.  I hadn't considered this approach.  I'll take a look.

Thanks,
Ken




More information about the wine-devel mailing list