On ConfigureNotify, find the first visible window above the current one.

This commit is contained in:
Pierre Mageau 1999-10-31 21:30:16 +00:00 committed by Alexandre Julliard
parent 68c78e7344
commit 18c9ee815e
1 changed files with 15 additions and 3 deletions

View File

@ -821,12 +821,24 @@ static void EVENT_ConfigureNotify( HWND hWnd, XConfigureEvent *event )
/* Get geometry and Z-order according to Wine */
GetWindowRect( hWnd, &rectWindow );
oldInsertAfter = GetWindow( hWnd, GW_HWNDPREV );
if ( !oldInsertAfter ) oldInsertAfter = HWND_TOP;
/*
* Needs to find the first Visible Window above the current one
*/
oldInsertAfter = hWnd;
for (;;)
{
oldInsertAfter = GetWindow( oldInsertAfter, GW_HWNDPREV );
if (!oldInsertAfter)
{
oldInsertAfter = HWND_TOP;
break;
}
if (GetWindowLongA( oldInsertAfter, GWL_STYLE ) & WS_VISIBLE) break;
}
/* Compare what has changed */
GetWindowRect( hWnd, &rectWindow );
if ( rectWindow.left == x && rectWindow.top == y )
flags |= SWP_NOMOVE;
else