Browse Source

Update mouse button state when re-entering a window

Fixes https://github.com/libsdl-org/SDL/issues/12423
Sam Lantinga 5 months ago
parent
commit
020664bd10
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/video/windows/SDL_windowsevents.c

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

@@ -1389,6 +1389,8 @@ LRESULT CALLBACK WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara
             if (TrackMouseEvent(&trackMouseEvent)) {
             if (TrackMouseEvent(&trackMouseEvent)) {
                 data->mouse_tracked = true;
                 data->mouse_tracked = true;
             }
             }
+
+            WIN_CheckAsyncMouseRelease(WIN_GetEventTimestamp(), data);
         }
         }
 
 
         if (!data->videodata->raw_mouse_enabled) {
         if (!data->videodata->raw_mouse_enabled) {