Wine for NET Core WPF Apps

Henri Verbeet hverbeet at gmail.com
Thu Aug 15 05:15:41 CDT 2019


On Thu, 15 Aug 2019 at 06:25, Christopher Cifra
<christopher.cifra at ni.com> wrote:
> I figured out the issues with multiple windows and WPF.  WPF passes in an override window to SwapChain Present when it wants to draw into a specific window.  In Wine when swapchain_gl_present calls context_acquire the context returned is for the wrong window because it does not look at the override window of the swap chain. I can fix the issue but it requires modifying context_acquire to take the swap chain as a parameter.  In the failure case there is no texture passed to context_acquire because the swap chain does not have a back buffer so I do not have a way to get the correct swap chain.  Because there is no texture wined3d_context_gl_acquire uses the first swap chain of the device which is not the correct swap chain and has a different window.
>

That doesn't sound quite right. The override window is handled by the
wined3d_swapchain_set_window() call in wined3d_cs_exec_present(), and
then applied to the context by the wined3d_context_gl_update_window()
call in wined3d_context_gl_activate().

The context_acquire() call in swapchain_gl_present() passes in the
frontbuffer, but if the swapchain didn't have any backbuffers you
wouldn't get there in the first place; wined3d_swapchain_present()
would return an error.

Henri



More information about the wine-devel mailing list