Skip to content

Commit

Permalink
Merge pull request #72720 from pkdawson/fix-mouse-capture
Browse files Browse the repository at this point in the history
DisplayServerWindows: Fix mouse capture when button up message is missed
  • Loading branch information
akien-mga committed Jun 22, 2023
2 parents e74bf83 + 7275819 commit d586096
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion platform/windows/display_server_windows.cpp
Expand Up @@ -3333,7 +3333,7 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
SetCapture(hWnd);
}
} else {
if (--pressrc <= 0) {
if (--pressrc <= 0 || last_button_state.is_empty()) {
if (mouse_mode != MOUSE_MODE_CAPTURED) {
ReleaseCapture();
}
Expand Down

0 comments on commit d586096

Please sign in to comment.