user32: Bring reference MDI child to bottom when switching to next.

This commit is contained in:
Sergey Guralnik 2013-06-06 08:17:15 +03:00 committed by Alexandre Julliard
parent 4ee9aef018
commit e90418d31c
2 changed files with 4 additions and 3 deletions

View File

@ -1156,8 +1156,11 @@ LRESULT MDIClientWndProc_common( HWND hwnd, UINT message, WPARAM wParam, LPARAM
case WM_MDINEXT: /* lParam != 0 means previous window */ case WM_MDINEXT: /* lParam != 0 means previous window */
{ {
HWND next = MDI_GetWindow( ci, WIN_GetFullHandle( (HWND)wParam ), !lParam, 0 ); HWND hwnd = wParam ? WIN_GetFullHandle((HWND)wParam) : ci->hwndActiveChild;
HWND next = MDI_GetWindow( ci, hwnd, !lParam, 0 );
MDI_SwitchActiveChild( ci, next, TRUE ); MDI_SwitchActiveChild( ci, next, TRUE );
if(!lParam)
SetWindowPos(hwnd, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE);
break; break;
} }

View File

@ -1545,7 +1545,6 @@ static void test_MDI_child_stack(HWND mdi_client)
stack[1] = GetWindow(stack[0], GW_HWNDNEXT); stack[1] = GetWindow(stack[0], GW_HWNDNEXT);
stack[2] = GetWindow(stack[1], GW_HWNDNEXT); stack[2] = GetWindow(stack[1], GW_HWNDNEXT);
stack[3] = GetWindow(stack[2], GW_HWNDNEXT); stack[3] = GetWindow(stack[2], GW_HWNDNEXT);
todo_wine
ok(stack[0] == child_2 && stack[1] == child_4 && ok(stack[0] == child_2 && stack[1] == child_4 &&
stack[2] == child_1 && stack[3] == child_3, stack[2] == child_1 && stack[3] == child_3,
"Broken MDI child stack:\nexpected: %p->%p->%p->%p, but got: %p->%p->%p->%p\n", "Broken MDI child stack:\nexpected: %p->%p->%p->%p, but got: %p->%p->%p->%p\n",
@ -1558,7 +1557,6 @@ todo_wine
stack[1] = GetWindow(stack[0], GW_HWNDNEXT); stack[1] = GetWindow(stack[0], GW_HWNDNEXT);
stack[2] = GetWindow(stack[1], GW_HWNDNEXT); stack[2] = GetWindow(stack[1], GW_HWNDNEXT);
stack[3] = GetWindow(stack[2], GW_HWNDNEXT); stack[3] = GetWindow(stack[2], GW_HWNDNEXT);
todo_wine
ok(stack[0] == child_4 && stack[1] == child_2 && ok(stack[0] == child_4 && stack[1] == child_2 &&
stack[2] == child_1 && stack[3] == child_3, stack[2] == child_1 && stack[3] == child_3,
"Broken MDI child stack:\nexpected: %p->%p->%p->%p, but got: %p->%p->%p->%p\n", "Broken MDI child stack:\nexpected: %p->%p->%p->%p, but got: %p->%p->%p->%p\n",