Commit 5d5853e3 authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

uxtheme: Handle BT_NONE in GetThemeBackgroundRegion().

parent 9fa5f83a
......@@ -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;
}
......
......@@ -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, &region);
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");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment