Skip to content

Commit

Permalink
Don't send WM_ACTIVATEAPP
Browse files Browse the repository at this point in the history
  • Loading branch information
elishacloud committed Nov 16, 2024
1 parent 477d121 commit d928c1e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 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 7329
#define BUILD_NUMBER 7330
9 changes: 1 addition & 8 deletions ddraw/IDirectDrawX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3132,9 +3132,6 @@ HRESULT m_IDirectDrawX::CreateD9Device(char* FunctionName)
// Store new focus window
hFocusWindow = hWnd;

// Check active
bool WndLastActive = (hWnd == GetForegroundWindow() && hWnd == GetFocus() && hWnd == GetActiveWindow());

// Get current resolution and rect
DWORD CurrentWidth = 0, CurrentHeight = 0;
Utils::GetScreenSize(hWnd, (LONG&)CurrentWidth, (LONG&)CurrentHeight);
Expand Down Expand Up @@ -3377,15 +3374,11 @@ HRESULT m_IDirectDrawX::CreateD9Device(char* FunctionName)
}

// Window focus and activate app
if (!WndLastActive || LastHWnd != hFocusWindow)
if (LastHWnd != hFocusWindow)
{
PostMessage(hWnd, WM_IME_SETCONTEXT, TRUE, ISC_SHOWUIALL);
PostMessage(hWnd, WM_SETFOCUS, NULL, NULL);
PostMessage(hWnd, WM_SYNCPAINT, (WPARAM)32, NULL);
PostMessage(hWnd, WM_ACTIVATEAPP, TRUE, (LPARAM)FocusWindowThreadID);
#ifdef WM_DWMNCRENDERINGCHANGED
PostMessage(hWnd, WM_DWMNCRENDERINGCHANGED, FALSE, NULL);
#endif
}
}

Expand Down

0 comments on commit d928c1e

Please sign in to comment.