Browse Source

Force WM_PAINT events on window resize

Ethan Lee 9 years ago
parent
commit
c3e48e71b4
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/video/windows/SDL_windowsevents.c

+ 3 - 0
src/video/windows/SDL_windowsevents.c

@@ -799,6 +799,9 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
             h = rect.bottom - rect.top;
             h = rect.bottom - rect.top;
             SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_RESIZED, w,
             SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_RESIZED, w,
                                 h);
                                 h);
+
+            /* Forces a WM_PAINT event */
+            InvalidateRect(hwnd, NULL, FALSE);
         }
         }
         break;
         break;