diff --git a/DDrawCompat/Gdi/Window.cpp b/DDrawCompat/Gdi/Window.cpp index ae419ea..1195f13 100644 --- a/DDrawCompat/Gdi/Window.cpp +++ b/DDrawCompat/Gdi/Window.cpp @@ -102,6 +102,17 @@ namespace } SetWindowPos(hwnd, insertAfter, wr.left, wr.top, wr.right - wr.left, wr.bottom - wr.top, flags); + + HRGN rgn = CreateRectRgn(0, 0, 0, 0); + if (ERROR != GetWindowRgn(owner, rgn)) + { + SetWindowRgn(hwnd, rgn, FALSE); + } + else + { + SetWindowRgn(hwnd, nullptr, FALSE); + DeleteObject(rgn); + } } else {