mirror of
https://github.com/reactos/reactos.git
synced 2025-05-23 11:04:52 +00:00
[Win32k]
- Fixes wine win.c:test_SetParent last ShowWindow test after popup dies. svn path=/trunk/; revision=65487
This commit is contained in:
parent
fb11517f41
commit
d1f8d55254
1 changed files with 29 additions and 5 deletions
|
@ -327,6 +327,7 @@ co_WinPosActivateOtherWindow(PWND Wnd)
|
|||
/* If this is popup window, try to activate the owner first. */
|
||||
if ((Wnd->style & WS_POPUP) && (WndTo = Wnd->spwndOwner))
|
||||
{
|
||||
ERR("WPAOW Popup with Owner\n");
|
||||
WndTo = UserGetAncestor( WndTo, GA_ROOT );
|
||||
if (can_activate_window(WndTo)) goto done;
|
||||
}
|
||||
|
@ -337,17 +338,40 @@ co_WinPosActivateOtherWindow(PWND Wnd)
|
|||
for (;;)
|
||||
{
|
||||
if (!(WndTo = WndTo->spwndNext)) break;
|
||||
if (can_activate_window( WndTo )) break;
|
||||
if (can_activate_window( WndTo )) goto done;
|
||||
}
|
||||
|
||||
/*
|
||||
Fixes wine win.c:test_SetParent last ShowWindow test after popup dies.
|
||||
Check for previous active window to bring to top.
|
||||
*/
|
||||
if (Wnd)
|
||||
{
|
||||
WndTo = Wnd->head.pti->MessageQueue->spwndActivePrev;
|
||||
if (can_activate_window( WndTo )) goto done;
|
||||
}
|
||||
|
||||
// Find any window to bring to top. Works Okay for wine.
|
||||
WndTo = UserGetDesktopWindow();
|
||||
WndTo = WndTo->spwndChild;
|
||||
for (;;)
|
||||
{
|
||||
if (WndTo == Wnd)
|
||||
{
|
||||
WndTo = NULL;
|
||||
break;
|
||||
}
|
||||
if (can_activate_window( WndTo )) goto done;
|
||||
if (!(WndTo = WndTo->spwndNext)) break;
|
||||
}
|
||||
|
||||
done:
|
||||
|
||||
if (WndTo) UserRefObjectCo(WndTo, &Ref);
|
||||
|
||||
if (!gpqForeground || Wnd == gpqForeground->spwndActive)
|
||||
if ((gpqForeground && !gpqForeground->spwndActive) || Wnd == gpqForeground->spwndActive)
|
||||
{
|
||||
/* ReactOS can pass WndTo = NULL to co_IntSetForegroundWindow and returns FALSE. */
|
||||
//ERR("WinPosActivateOtherWindow Set FG 0x%p\n",WndTo);
|
||||
//ERR("WinPosActivateOtherWindow Set FG 0x%p hWnd %p\n",WndTo, WndTo ? WndTo->head.h : 0);
|
||||
if (co_IntSetForegroundWindow(WndTo))
|
||||
{
|
||||
if (WndTo) UserDerefObjectCo(WndTo);
|
||||
|
|
Loading…
Reference in a new issue