Skip to content

Commit

Permalink
Remove clip children for popup windows
Browse files Browse the repository at this point in the history
  • Loading branch information
elishacloud committed Jan 23, 2025
1 parent a7624a6 commit 85e3f8c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Dllmain/BuildNo.rc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#define BUILD_NUMBER 7452
#define BUILD_NUMBER 7453
10 changes: 9 additions & 1 deletion d3d9/IDirect3D9Ex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,14 @@ void AdjustWindow(HWND MainhWnd, LONG displayWidth, LONG displayHeight, bool isW
return;
}

// Remove clip children for popup windows
LONG lStyle = GetWindowLong(MainhWnd, GWL_STYLE);
if ((lStyle & WS_POPUP) && (lStyle & WS_CLIPCHILDREN))
{
SetWindowLong(MainhWnd, GWL_STYLE, lStyle & ~WS_CLIPCHILDREN);
SetWindowPos(MainhWnd, HWND_TOP, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED);
}

// Set window active and focus
if (Config.EnableWindowMode || isWindowed)
{
Expand Down Expand Up @@ -667,7 +675,7 @@ void AdjustWindow(HWND MainhWnd, LONG displayWidth, LONG displayHeight, bool isW
Utils::GetDesktopRect(MainhWnd, screenRect);

// Get window style
LONG lStyle = GetWindowLong(MainhWnd, GWL_STYLE);
lStyle = GetWindowLong(MainhWnd, GWL_STYLE);
LONG lExStyle = GetWindowLong(MainhWnd, GWL_EXSTYLE);

// Set window style
Expand Down

0 comments on commit 85e3f8c

Please sign in to comment.