28 lines
754 B
C++
28 lines
754 B
C++
#include "Platform/Win32/EditorWindowFrameDriver.h"
|
|
|
|
#include "Platform/Win32/EditorWindow.h"
|
|
|
|
namespace XCEngine::UI::Editor::App {
|
|
|
|
EditorWindowFrameTransferRequests EditorWindowFrameDriver::DriveFrame(
|
|
EditorWindow& window,
|
|
EditorContext& editorContext,
|
|
bool globalTabDragActive) {
|
|
if (!window.IsRenderReady() ||
|
|
window.GetHwnd() == nullptr ||
|
|
window.IsClosing()) {
|
|
return {};
|
|
}
|
|
|
|
EditorWindowFrameTransferRequests transferRequests =
|
|
window.RenderFrame(editorContext, globalTabDragActive);
|
|
if (const HWND hwnd = window.GetHwnd();
|
|
hwnd != nullptr && IsWindow(hwnd)) {
|
|
ValidateRect(hwnd, nullptr);
|
|
}
|
|
|
|
return transferRequests;
|
|
}
|
|
|
|
} // namespace XCEngine::UI::Editor::App
|