mirror of
https://github.com/reactos/wine.git
synced 2024-11-29 06:30:37 +00:00
ShowOwnedPopups and WM_SHOWWINDOW should handle non-WS_POPUP style
windows as well.
This commit is contained in:
parent
c668952023
commit
f32bcd8fc1
@ -580,11 +580,24 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
|
||||
case WM_SHOWWINDOW:
|
||||
{
|
||||
LONG style = GetWindowLongW( hwnd, GWL_STYLE );
|
||||
WND *pWnd;
|
||||
if (!lParam) return 0; /* sent from ShowWindow */
|
||||
if (!(style & WS_POPUP)) return 0;
|
||||
if ((style & WS_VISIBLE) && wParam) return 0;
|
||||
if (!(style & WS_VISIBLE) && !wParam) return 0;
|
||||
if (!GetWindow( hwnd, GW_OWNER )) return 0;
|
||||
if (!(pWnd = WIN_GetPtr( hwnd ))) return 0;
|
||||
if (pWnd == WND_OTHER_PROCESS) return 0;
|
||||
if (wParam)
|
||||
{
|
||||
if (!(pWnd->flags & WIN_NEEDS_SHOW_OWNEDPOPUP))
|
||||
{
|
||||
WIN_ReleasePtr( pWnd );
|
||||
return 0;
|
||||
}
|
||||
pWnd->flags &= ~WIN_NEEDS_SHOW_OWNEDPOPUP;
|
||||
}
|
||||
else pWnd->flags |= WIN_NEEDS_SHOW_OWNEDPOPUP;
|
||||
WIN_ReleasePtr( pWnd );
|
||||
ShowWindow( hwnd, wParam ? SW_SHOWNOACTIVATE : SW_HIDE );
|
||||
break;
|
||||
}
|
||||
|
@ -2686,36 +2686,30 @@ BOOL WINAPI ShowOwnedPopups( HWND owner, BOOL fShow )
|
||||
if (GetWindow( win_array[count], GW_OWNER ) != owner) continue;
|
||||
if (!(pWnd = WIN_GetPtr( win_array[count] ))) continue;
|
||||
if (pWnd == WND_OTHER_PROCESS) continue;
|
||||
|
||||
if (pWnd->dwStyle & WS_POPUP)
|
||||
if (fShow)
|
||||
{
|
||||
if (fShow)
|
||||
if (pWnd->flags & WIN_NEEDS_SHOW_OWNEDPOPUP)
|
||||
{
|
||||
if (pWnd->flags & WIN_NEEDS_SHOW_OWNEDPOPUP)
|
||||
{
|
||||
pWnd->flags &= ~WIN_NEEDS_SHOW_OWNEDPOPUP;
|
||||
WIN_ReleasePtr( pWnd );
|
||||
/* In Windows, ShowOwnedPopups(TRUE) generates
|
||||
* WM_SHOWWINDOW messages with SW_PARENTOPENING,
|
||||
* regardless of the state of the owner
|
||||
*/
|
||||
SendMessageW(win_array[count], WM_SHOWWINDOW, SW_SHOW, SW_PARENTOPENING);
|
||||
continue;
|
||||
}
|
||||
WIN_ReleasePtr( pWnd );
|
||||
/* In Windows, ShowOwnedPopups(TRUE) generates
|
||||
* WM_SHOWWINDOW messages with SW_PARENTOPENING,
|
||||
* regardless of the state of the owner
|
||||
*/
|
||||
SendMessageW(win_array[count], WM_SHOWWINDOW, SW_SHOWNORMAL, SW_PARENTOPENING);
|
||||
continue;
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pWnd->dwStyle & WS_VISIBLE)
|
||||
{
|
||||
if (pWnd->dwStyle & WS_VISIBLE)
|
||||
{
|
||||
pWnd->flags |= WIN_NEEDS_SHOW_OWNEDPOPUP;
|
||||
WIN_ReleasePtr( pWnd );
|
||||
/* In Windows, ShowOwnedPopups(FALSE) generates
|
||||
* WM_SHOWWINDOW messages with SW_PARENTCLOSING,
|
||||
* regardless of the state of the owner
|
||||
*/
|
||||
SendMessageW(win_array[count], WM_SHOWWINDOW, SW_HIDE, SW_PARENTCLOSING);
|
||||
continue;
|
||||
}
|
||||
WIN_ReleasePtr( pWnd );
|
||||
/* In Windows, ShowOwnedPopups(FALSE) generates
|
||||
* WM_SHOWWINDOW messages with SW_PARENTCLOSING,
|
||||
* regardless of the state of the owner
|
||||
*/
|
||||
SendMessageW(win_array[count], WM_SHOWWINDOW, SW_HIDE, SW_PARENTCLOSING);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
WIN_ReleasePtr( pWnd );
|
||||
|
Loading…
Reference in New Issue
Block a user