Commit e90418d3 authored by Sergey Guralnik's avatar Sergey Guralnik Committed by Alexandre Julliard

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

parent 4ee9aef0
...@@ -1156,8 +1156,11 @@ LRESULT MDIClientWndProc_common( HWND hwnd, UINT message, WPARAM wParam, LPARAM ...@@ -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;
} }
......
...@@ -1545,7 +1545,6 @@ static void test_MDI_child_stack(HWND mdi_client) ...@@ -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 ...@@ -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",
......
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