mirror of
https://github.com/narzoul/DDrawCompat
synced 2024-12-30 08:55:36 +01:00
Invalidate windows beneath hidden WS_EX_TRANSPARENT windows
Fixes stuck items in Diablo 1 character creation menu.
This commit is contained in:
parent
0e7f397863
commit
c5a867bac5
@ -17,6 +17,7 @@ namespace
|
||||
struct UpdateWindowContext
|
||||
{
|
||||
Gdi::Region obscuredRegion;
|
||||
Gdi::Region invalidatedRegion;
|
||||
Gdi::Region virtualScreenRegion;
|
||||
DWORD processId;
|
||||
};
|
||||
@ -96,7 +97,7 @@ namespace
|
||||
}
|
||||
|
||||
void updatePosition(Window& window, const RECT& oldWindowRect, const RECT& oldClientRect,
|
||||
const Gdi::Region& oldVisibleRegion)
|
||||
const Gdi::Region& oldVisibleRegion, const Gdi::Region& invalidatedRegion)
|
||||
{
|
||||
const bool isClientOriginChanged =
|
||||
window.clientRect.left - window.windowRect.left != oldClientRect.left - oldWindowRect.left ||
|
||||
@ -155,6 +156,8 @@ namespace
|
||||
preservedRegion -= updateRegion;
|
||||
}
|
||||
|
||||
preservedRegion -= invalidatedRegion;
|
||||
|
||||
if (!isFrameInvalidated)
|
||||
{
|
||||
bltWindow(window.windowRect, oldWindowRect, preservedRegion);
|
||||
@ -256,7 +259,12 @@ namespace
|
||||
{
|
||||
if (!it->second.visibleRegion.isEmpty())
|
||||
{
|
||||
updatePosition(it->second, wi.rcWindow, wi.rcClient, visibleRegion);
|
||||
updatePosition(it->second, wi.rcWindow, wi.rcClient, visibleRegion, context.invalidatedRegion);
|
||||
}
|
||||
|
||||
if (exStyle & WS_EX_TRANSPARENT)
|
||||
{
|
||||
context.invalidatedRegion |= visibleRegion - it->second.visibleRegion;
|
||||
}
|
||||
|
||||
if (isVisible && !it->second.isVisibleRegionChanged)
|
||||
|
Loading…
x
Reference in New Issue
Block a user