Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com --- dlls/dxgi/swapchain.c | 3 +++ dlls/dxgi/tests/dxgi.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/dxgi/swapchain.c b/dlls/dxgi/swapchain.c index e09df4862d..179e61b233 100644 --- a/dlls/dxgi/swapchain.c +++ b/dlls/dxgi/swapchain.c @@ -306,6 +306,9 @@ static HRESULT d3d11_swapchain_present(struct d3d11_swapchain *swapchain, return DXGI_ERROR_INVALID_CALL; }
+ if (IsIconic(d3d11_swapchain_get_hwnd(swapchain))) + return DXGI_STATUS_OCCLUDED; + if (flags & ~DXGI_PRESENT_TEST) FIXME("Unimplemented flags %#x.\n", flags); if (flags & DXGI_PRESENT_TEST) diff --git a/dlls/dxgi/tests/dxgi.c b/dlls/dxgi/tests/dxgi.c index 3d6e7f99b2..207d7782d5 100644 --- a/dlls/dxgi/tests/dxgi.c +++ b/dlls/dxgi/tests/dxgi.c @@ -4072,7 +4072,7 @@ static void test_swapchain_present(IUnknown *device, BOOL is_d3d12) /* Minimized window */ ShowWindow(swapchain_desc.OutputWindow, SW_MINIMIZE); hr = IDXGISwapChain_Present(swapchain, 0, flags[i]); - todo_wine_if(!is_d3d12) ok(hr == (is_d3d12 ? S_OK : DXGI_STATUS_OCCLUDED), "Got unexpected hr %#x.\n", hr); + ok(hr == (is_d3d12 ? S_OK : DXGI_STATUS_OCCLUDED), "Got unexpected hr %#x.\n", hr); ShowWindow(swapchain_desc.OutputWindow, SW_NORMAL);
/* Hidden window */
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=53577
Your paranoid android.
=== w2008s64 (32 bit report) ===
dxgi: dxgi.c:4755: Test failed: Got unexpected message 0x46, hwnd 001200C0, wparam 0, lparam 0x27fb80. dxgi.c:4755: Test failed: Got unexpected message 0x24, hwnd 001200C0, wparam 0, lparam 0x27f900. dxgi.c:4755: Test failed: Got unexpected message 0x1a, hwnd 001200C0, wparam 0x18, lparam 0x7e528. dxgi.c:4755: Test failed: Got unexpected message 0x1a, hwnd 001200C0, wparam 0x2f, lparam 0x7e528.