Fix helper mouse button up event on drag drop end on Windows
Regression from 4efd411045
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
|
||||
#include "Engine/Core/Collections/Array.h"
|
||||
#include "Engine/Engine/Engine.h"
|
||||
#include "Engine/Engine/Screen.h"
|
||||
#include "Engine/Platform/IGuiData.h"
|
||||
#include "Engine/Input/Input.h"
|
||||
#include "Engine/Input/Mouse.h"
|
||||
@@ -621,7 +622,11 @@ DragDropEffect WindowsWindow::DoDragDrop(const StringView& data)
|
||||
|
||||
// Fix hanging mouse state (Windows doesn't send WM_LBUTTONUP when we end the drag and drop)
|
||||
if (Input::GetMouseButton(MouseButton::Left))
|
||||
Input::Mouse->OnMouseUp(Input::Mouse->GetPosition(), MouseButton::Left, this);
|
||||
{
|
||||
::POINT point;
|
||||
::GetCursorPos(&point);
|
||||
Input::Mouse->OnMouseUp(Float2((float)point.x, (float)point.y), MouseButton::Left, this);
|
||||
}
|
||||
|
||||
return SUCCEEDED(result) ? dropEffectFromOleEnum(dwEffect) : DragDropEffect::None;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user