Merge pull request #72720 from pkdawson/fix-mouse-capture

DisplayServerWindows: Fix mouse capture when button up message is missed
This commit is contained in:
Rémi Verschelde 2023-06-22 18:29:34 +02:00
commit d586096415
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 1 additions and 1 deletions

View File

@ -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();
}