ddraw/tests: Added todo_wine test to verify resizing of fullscreen windows.

This commit is contained in:
Johan Gill 2010-04-07 12:24:15 +02:00 committed by Alexandre Julliard
parent 83680cd094
commit 15b959fba7
1 changed files with 12 additions and 2 deletions

View File

@ -388,6 +388,9 @@ static void enumdisplaymodes(void)
static void setdisplaymode(int i) static void setdisplaymode(int i)
{ {
HRESULT rc; HRESULT rc;
RECT orig_rect;
SetRect(&orig_rect, 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN));
rc = IDirectDraw_SetCooperativeLevel(lpDD, rc = IDirectDraw_SetCooperativeLevel(lpDD,
hwnd, DDSCL_ALLOWMODEX | DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); hwnd, DDSCL_ALLOWMODEX | DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN);
@ -402,14 +405,21 @@ static void setdisplaymode(int i)
ok(DD_OK==rc || DDERR_UNSUPPORTED==rc,"SetDisplayMode returned: %x\n",rc); ok(DD_OK==rc || DDERR_UNSUPPORTED==rc,"SetDisplayMode returned: %x\n",rc);
if (rc == DD_OK) if (rc == DD_OK)
{ {
RECT r, scrn, virt; RECT r, scrn, test, virt;
SetRect(&virt, 0, 0, GetSystemMetrics(SM_CXVIRTUALSCREEN), GetSystemMetrics(SM_CYVIRTUALSCREEN)); SetRect(&virt, 0, 0, GetSystemMetrics(SM_CXVIRTUALSCREEN), GetSystemMetrics(SM_CYVIRTUALSCREEN));
OffsetRect(&virt, GetSystemMetrics(SM_XVIRTUALSCREEN), GetSystemMetrics(SM_YVIRTUALSCREEN)); OffsetRect(&virt, GetSystemMetrics(SM_XVIRTUALSCREEN), GetSystemMetrics(SM_YVIRTUALSCREEN));
SetRect(&scrn, 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN)); SetRect(&scrn, 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN));
trace("Mode (%dx%d) [%dx%d] (%d %d)x(%d %d)\n", modes[i].dwWidth, modes[i].dwHeight, trace("Mode (%dx%d) [%dx%d] (%d %d)x(%d %d)\n", modes[i].dwWidth, modes[i].dwHeight,
scrn.right, scrn.bottom, virt.left, virt.top, virt.right, virt.bottom); scrn.right, scrn.bottom, virt.left, virt.top, virt.right, virt.bottom);
if (!EqualRect(&scrn, &orig_rect))
{
/* Check that the client rect was resized */
rc = GetClientRect(hwnd, &test);
ok(rc!=0, "GetClientRect returned %x\n", rc);
rc = EqualRect(&scrn, &test);
todo_wine ok(rc!=0, "Fullscreen window has wrong size\n");
}
ok(GetClipCursor(&r), "GetClipCursor() failed\n"); ok(GetClipCursor(&r), "GetClipCursor() failed\n");
/* ddraw sets clip rect here to the screen size, even for /* ddraw sets clip rect here to the screen size, even for
multiple monitors */ multiple monitors */