windows: Drop WM_ACTIVATE when window is hidden, but only if being activated.
authorRyan C. Gordon <icculus@icculus.org>
Tue, 11 Jun 2019 01:14:24 -0400
changeset 128242f882d435abf
parent 12823 f7629f5761d8
child 12825 4fb5e61382b7
windows: Drop WM_ACTIVATE when window is hidden, but only if being activated.

Fixes Bugzilla #4571.
src/video/windows/SDL_windowsevents.c
     1.1 --- a/src/video/windows/SDL_windowsevents.c	Mon Jun 10 21:58:03 2019 +0200
     1.2 +++ b/src/video/windows/SDL_windowsevents.c	Tue Jun 11 01:14:24 2019 -0400
     1.3 @@ -428,13 +428,12 @@
     1.4              POINT cursorPos;
     1.5              BOOL minimized;
     1.6  
     1.7 -            /* Don't mark the window as shown if it's activated before being shown */
     1.8 -            if (!IsWindowVisible(hwnd)) {
     1.9 -                break;
    1.10 -            }
    1.11 -
    1.12              minimized = HIWORD(wParam);
    1.13              if (!minimized && (LOWORD(wParam) != WA_INACTIVE)) {
    1.14 +                /* Don't mark the window as shown if it's activated before being shown */
    1.15 +                if (!IsWindowVisible(hwnd)) {
    1.16 +                    break;
    1.17 +                }
    1.18                  if (LOWORD(wParam) == WA_CLICKACTIVE) {
    1.19                      if (GetAsyncKeyState(VK_LBUTTON)) {
    1.20                          data->focus_click_pending |= SDL_BUTTON_LMASK;