Merge branch '1.5' into dotnet7

This commit is contained in:
Wojciech Figat
2022-12-21 10:35:58 +01:00
330 changed files with 3405 additions and 1555 deletions

View File

@@ -1079,7 +1079,6 @@ int32 WindowsPlatform::RunProcess(const StringView& cmdLine, const StringView& w
HANDLE stdOutRead = nullptr;
HANDLE stdErrRead = nullptr;
Array<byte> attributeList;
if (captureStdOut)
{
@@ -1101,8 +1100,7 @@ int32 WindowsPlatform::RunProcess(const StringView& cmdLine, const StringView& w
SIZE_T bufferSize = 0;
if (!InitializeProcThreadAttributeList(nullptr, 1, 0, &bufferSize) && GetLastError() == ERROR_INSUFFICIENT_BUFFER)
{
attributeList.Resize((int32)bufferSize);
startupInfoEx.lpAttributeList = (LPPROC_THREAD_ATTRIBUTE_LIST)attributeList.Get();
startupInfoEx.lpAttributeList = (LPPROC_THREAD_ATTRIBUTE_LIST)Allocator::Allocate(bufferSize);
if (!InitializeProcThreadAttributeList(startupInfoEx.lpAttributeList, 1, 0, &bufferSize))
{
LOG(Warning, "InitializeProcThreadAttributeList failed");
@@ -1126,9 +1124,6 @@ int32 WindowsPlatform::RunProcess(const StringView& cmdLine, const StringView& w
goto ERROR_EXIT;
}
if (environmentStr)
Allocator::Free(environmentStr);
if (stdOutRead != nullptr)
{
// Keep reading std output and std error streams until process is running
@@ -1176,7 +1171,10 @@ ERROR_EXIT:
if (startupInfoEx.lpAttributeList != nullptr)
{
DeleteProcThreadAttributeList(startupInfoEx.lpAttributeList);
Allocator::Free(startupInfoEx.lpAttributeList);
}
if (environmentStr)
Allocator::Free(environmentStr);
return result;
}

View File

@@ -621,7 +621,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;
}