Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DisplayServerWindows: Fix mouse capture when button up message is missed #72720

Merged
merged 1 commit into from Jun 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion platform/windows/display_server_windows.cpp
Expand Up @@ -3266,7 +3266,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