[PATCH] wined3d: Restore the Topmost state upon exiting fullscreen, when used from DXGI.

Gabriel Ivăncescu gabrielopcode at gmail.com
Thu Jul 2 11:06:09 CDT 2020

On 02/07/2020 18:44, Henri Verbeet wrote:
> On Thu, 2 Jul 2020 at 19:50, Gabriel Ivăncescu <gabrielopcode at gmail.com> wrote:
>>>> diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
>>>> index 346d1d0..cee46d3 100644
>>>> --- a/include/wine/wined3d.h
>>>> +++ b/include/wine/wined3d.h
>>>> @@ -905,6 +905,7 @@ enum wined3d_shader_type
>>>>    #define WINED3D_SWAPCHAIN_GDI_COMPATIBLE                        0x00008000u
>>>>    #define WINED3D_SWAPCHAIN_IMPLICIT                              0x00010000u
>>>>    #define WINED3D_SWAPCHAIN_HOOK                                  0x00020000u
>>>> +#define WINED3D_SWAPCHAIN_TOPMOST_RESTORE                       0x00040000u
>>> Ideally WINED3D_SWAPCHAIN_TOPMOST_RESTORE would simply be merged with
>>> WINED3D_SWAPCHAIN_RESTORE_WINDOW_RECT, but the naming should at least
>>> be consistent.
>> So in that case I'd simply check to see if the rect is NULL or not, to
>> restore TOPMOST, within the function that restores it, right?
> No, you'd rename WINED3D_SWAPCHAIN_RESTORE_WINDOW_RECT to something
> like WINED3D_SWAPCHAIN_RESTORE_GEOMETRY (although it's perhaps a bit
> of a stretch to include the stacking order in "geometry"), and then
> check for that flag the same way the current patch checks for
>> As for the name, how about WINED3D_SWAPCHAIN_RESTORE_WINDOW_STATE? (I'll
>> of course send it as a separate patch)
> I could live with it, but "state" is very broad.

Yeah, I was basing it off Rémi's patch series to ease it later when he 
rebases them. From that perspective, I think it's better if I add a new 
flag, since it will be needed later by his patches anyway (for ddraw, 
d3d9 and dxgi different behaviors).

Currently I'm thinking of something like 
WINED3D_SWAPCHAIN_RESTORE_ZORDER. I'll do some more testing to see if it 
works with his patches, though, otherwise there's not much point to it.

Unless that's not desirable then I'll go with the 
WINED3D_SWAPCHAIN_RESTORE_GEOMETRY thing (which only applies to dxgi).

More information about the wine-devel mailing list