Refactor editor windowing and update renderer regression
This commit is contained in:
@@ -8,9 +8,9 @@
|
||||
#include "Platform/Win32/Runtime/EditorWindowRuntimeController.h"
|
||||
#include "Platform/Win32/Windowing/EditorWindowPointerCapture.h"
|
||||
#include "Platform/Win32/Windowing/EditorWindowHostRuntime.h"
|
||||
#include "Platform/Win32/Windowing/EditorWindowLifecycleCoordinator.h"
|
||||
#include "Platform/Win32/Windowing/EditorUtilityWindowCoordinator.h"
|
||||
#include "Platform/Win32/Windowing/EditorWindowWorkspaceCoordinator.h"
|
||||
#include "Windowing/Coordinator/EditorWindowLifecycleCoordinator.h"
|
||||
#include "Windowing/Coordinator/EditorUtilityWindowCoordinator.h"
|
||||
#include "Windowing/Coordinator/EditorWindowWorkspaceCoordinator.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <sstream>
|
||||
@@ -23,38 +23,6 @@ namespace {
|
||||
constexpr UINT kMessageNcUaDrawCaption = 0x00AEu;
|
||||
constexpr UINT kMessageNcUaDrawFrame = 0x00AFu;
|
||||
|
||||
std::string DescribeHwnd(HWND hwnd) {
|
||||
std::ostringstream stream = {};
|
||||
stream << "0x" << std::hex << std::uppercase
|
||||
<< reinterpret_cast<std::uintptr_t>(hwnd);
|
||||
return stream.str();
|
||||
}
|
||||
|
||||
std::string DescribeHostWindows(const EditorWindowHostRuntime& hostRuntime) {
|
||||
std::ostringstream stream = {};
|
||||
const auto& windows = hostRuntime.GetWindows();
|
||||
stream << "count=" << windows.size() << " [";
|
||||
bool first = true;
|
||||
for (const std::unique_ptr<EditorWindow>& window : windows) {
|
||||
if (!first) {
|
||||
stream << ", ";
|
||||
}
|
||||
first = false;
|
||||
if (window == nullptr) {
|
||||
stream << "<null>";
|
||||
continue;
|
||||
}
|
||||
|
||||
stream << window->GetWindowId()
|
||||
<< "{hwnd=" << DescribeHwnd(window->GetHwnd())
|
||||
<< ",primary=" << (window->IsPrimary() ? '1' : '0')
|
||||
<< ",state=" << GetEditorWindowLifecycleStateName(window->GetLifecycleState())
|
||||
<< '}';
|
||||
}
|
||||
stream << ']';
|
||||
return stream.str();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
struct EditorWindowMessageDispatcher::DispatchContext {
|
||||
@@ -185,7 +153,7 @@ bool EditorWindowMessageDispatcher::TryDispatchWindowPointerMessage(
|
||||
if (CanRouteEditorWindowGlobalTabDragPointerMessages(
|
||||
inputController.GetPointerCaptureOwner(),
|
||||
context.workspaceCoordinator.OwnsActiveGlobalTabDrag(context.window.GetWindowId())) &&
|
||||
context.workspaceCoordinator.HandleGlobalTabDragPointerMove(context.hwnd)) {
|
||||
context.workspaceCoordinator.HandleGlobalTabDragPointerMove(context.window)) {
|
||||
outResult = 0;
|
||||
return true;
|
||||
}
|
||||
@@ -274,7 +242,7 @@ bool EditorWindowMessageDispatcher::TryDispatchWindowPointerMessage(
|
||||
if (CanRouteEditorWindowGlobalTabDragPointerMessages(
|
||||
inputController.GetPointerCaptureOwner(),
|
||||
context.workspaceCoordinator.OwnsActiveGlobalTabDrag(context.window.GetWindowId())) &&
|
||||
context.workspaceCoordinator.HandleGlobalTabDragPointerButtonUp(context.hwnd)) {
|
||||
context.workspaceCoordinator.HandleGlobalTabDragPointerButtonUp(context.window)) {
|
||||
outResult = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user