From: Zhiyi Zhang zzhang@codeweavers.com
Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com --- dlls/uxtheme/draw.c | 6 +++++- dlls/uxtheme/tests/system.c | 1 - 2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/uxtheme/draw.c b/dlls/uxtheme/draw.c index 55242d92559..3286d70d4d1 100644 --- a/dlls/uxtheme/draw.c +++ b/dlls/uxtheme/draw.c @@ -2063,8 +2063,12 @@ HRESULT WINAPI GetThemeBackgroundRegion(HTHEME hTheme, HDC hdc, int iPartId, if(!*pRegion) hr = HRESULT_FROM_WIN32(GetLastError()); } + else if (bgtype == BT_NONE) + { + hr = E_UNEXPECTED; + } else { - FIXME("Unknown background type\n"); + FIXME("Unknown background type %d\n", bgtype); /* This should never happen, and hence I don't know what to return */ hr = E_FAIL; } diff --git a/dlls/uxtheme/tests/system.c b/dlls/uxtheme/tests/system.c index e9c91c62638..aa566f554ff 100644 --- a/dlls/uxtheme/tests/system.c +++ b/dlls/uxtheme/tests/system.c @@ -2425,7 +2425,6 @@ static void test_GetThemeBackgroundRegion(void) SetRect(&rect, 0, 0, 10, 10); region = (HRGN)0xdeadbeef; hr = GetThemeBackgroundRegion(htheme, NULL, RP_BAND, 0, &rect, ®ion); - todo_wine ok(hr == E_UNEXPECTED || broken(hr == S_OK) /* < Win10 */, "Got unexpected hr %#lx.\n", hr); ok(region == (HRGN)0xdeadbeef, "Got unexpected region.\n");