On 28/12/2021 18:16, Henri Verbeet wrote:
On Mon, 27 Dec 2021 at 15:32, Gabriel Ivăncescu gabrielopcode@gmail.com wrote:
@@ -970,6 +970,9 @@ static HRESULT ddraw_set_cooperative_level(struct ddraw *ddraw, HWND window,
if (!(cooplevel & DDSCL_EXCLUSIVE) && (ddraw->cooperative_level & DDSCL_EXCLUSIVE)) {
if (!(cooplevel & DDSCL_NOWINDOWCHANGES))
SetWindowPos(window, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
Something similar to patch 1/2 in this series applies here; it's not immediately obvious from the tests whether this is the correct place to do this, or whether something similar should be done for other versions of D3D.
I'll try to test and see what happens with other D3D versions, maybe we already have tests that would start failing if I did... but for this one in particular, I don't think it's possible to move it to wined3d without some ddraw-exclusive flag.
I mean, this only happens with the DDSCL_NOWINDOWCHANGES cooplevel flag, which is ddraw specific to this function. And it happens when the API is called to exit exclusive mode with this flag unset. How is wined3d supposed to know this?