1
0
mirror of https://github.com/narzoul/DDrawCompat synced 2024-12-30 08:55:36 +01:00

Fixed disappearing dialog boxes in Lego Loco

See issue #179.
This commit is contained in:
narzoul 2024-04-30 17:19:51 +02:00
parent 2fe2e03455
commit 474fdb1e45
2 changed files with 5 additions and 11 deletions

View File

@ -749,7 +749,8 @@ namespace DDraw
Gdi::GuiThread::execute([&]()
{
CALL_ORIG_FUNC(SetWindowPos)(g_presentationWindow, HWND_TOPMOST, 0, 0, 0, 0,
SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOSENDCHANGING | SWP_NOREDRAW | SWP_NOOWNERZORDER);
SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOSENDCHANGING | SWP_NOREDRAW | SWP_NOOWNERZORDER |
(IsWindowVisible(GetWindow(g_presentationWindow, GW_OWNER)) ? SWP_SHOWWINDOW : SWP_HIDEWINDOW));
});
}
}

View File

@ -355,22 +355,14 @@ namespace
context.invalidatedRegion |= visibleRegion - it->second.visibleRegion;
}
if (it->second.presentationWindow && isVisible &&
if (it->second.presentationWindow &&
it->second.presentationWindow != DDraw::RealPrimarySurface::getPresentationWindow())
{
Gdi::GuiThread::setWindowRgn(it->second.presentationWindow, Gdi::Window::getWindowRgn(hwnd));
Gdi::Window::updatePresentationWindowPos(it->second.presentationWindow, hwnd);
}
}
if (isWindowVisible)
{
g_windowZOrder.push_back(&it->second);
}
else
{
removeWindow(it);
}
g_windowZOrder.push_back(&it->second);
return TRUE;
}
}
@ -713,6 +705,7 @@ namespace Gdi
wp.flags = SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOREDRAW | SWP_NOSENDCHANGING;
if (IsWindowVisible(owner))
{
Gdi::GuiThread::setWindowRgn(presentationWindow, getWindowRgn(owner));
wp.hwndInsertAfter = CALL_ORIG_FUNC(GetWindow)(owner, GW_HWNDPREV);
if (!wp.hwndInsertAfter)
{