Skip to content
Permalink
Browse files

windows: Drop WM_ACTIVATE when window is hidden, but only if being ac…

…tivated.

Fixes Bugzilla #4571.
  • Loading branch information
icculus committed Jun 11, 2019
1 parent f9a9193 commit 399df540e3ec946b65ac899d741e8193c8c56105
Showing with 4 additions and 5 deletions.
  1. +4 −5 src/video/windows/SDL_windowsevents.c
@@ -428,13 +428,12 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
POINT cursorPos;
BOOL minimized;

/* Don't mark the window as shown if it's activated before being shown */
if (!IsWindowVisible(hwnd)) {
break;
}

minimized = HIWORD(wParam);
if (!minimized && (LOWORD(wParam) != WA_INACTIVE)) {
/* Don't mark the window as shown if it's activated before being shown */
if (!IsWindowVisible(hwnd)) {
break;
}
if (LOWORD(wParam) == WA_CLICKACTIVE) {
if (GetAsyncKeyState(VK_LBUTTON)) {
data->focus_click_pending |= SDL_BUTTON_LMASK;

0 comments on commit 399df54

Please sign in to comment.