Made SetWindowPos handle the case when inserting a window after itself

(don't need to change the Zorder).
This commit is contained in:
Noomen Hamza 2000-06-14 21:16:18 +00:00 committed by Alexandre Julliard
parent d0dfcde4fb
commit 6effb2304b
1 changed files with 4 additions and 1 deletions

View File

@ -2582,7 +2582,10 @@ BOOL WINAPI SetWindowPos( HWND hwnd, HWND hwndInsertAfter,
WIN_ReleaseWndPtr(wnd);
goto END;
}
if( wnd->next == wndPtr ) flags |= SWP_NOZORDER;
/* don't need to change the Zorder of hwnd if it's already inserted
* after hwndInsertAfter or when inserting hwnd after itself.
*/
if(( wnd->next == wndPtr ) || (hwnd == hwndInsertAfter)) flags |= SWP_NOZORDER;
}
WIN_ReleaseWndPtr(wnd);
}