From 1c595b759ccc34cf7476bbf9d294e9e41b8bb512 Mon Sep 17 00:00:00 2001 From: Ari Vuollet Date: Tue, 21 Jan 2025 19:08:38 +0200 Subject: [PATCH] Fix button latching after finishing drag and drop operation --- Source/Engine/Platform/Windows/WindowsWindow.DragDrop.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Engine/Platform/Windows/WindowsWindow.DragDrop.cpp b/Source/Engine/Platform/Windows/WindowsWindow.DragDrop.cpp index a7677fb93..3f17ed2c3 100644 --- a/Source/Engine/Platform/Windows/WindowsWindow.DragDrop.cpp +++ b/Source/Engine/Platform/Windows/WindowsWindow.DragDrop.cpp @@ -601,7 +601,8 @@ DragDropEffect Window::DoDragDrop(const StringView& data) ::POINT point; ::GetCursorPos(&point); #if PLATFORM_SDL - Input::Mouse->OnMouseUp(Float2((float)point.x, (float)point.y), MouseButton::Left, (Window*)this); + // Reset the internal button state in SDL + SendMessageA((HWND)_handle, WM_LBUTTONUP, 0, MAKELPARAM(point.x, point.y)); #else Input::Mouse->OnMouseUp(Float2((float)point.x, (float)point.y), MouseButton::Left, this); #endif