new_editor: close startup screenshot ownership

This commit is contained in:
2026-04-22 02:47:28 +08:00
parent b863dfe727
commit 173ab89158
8 changed files with 45 additions and 48 deletions

View File

@@ -5,6 +5,7 @@
#include "Platform/Win32/EditorWindowManager.h"
#include "Platform/Win32/EditorWindow.h"
#include "Platform/Win32/Win32SystemInteractionHost.h"
#include "Support/EnvironmentFlags.h"
#include "Support/ExecutablePath.h"
#include <XCEditor/Foundation/UIEditorRuntimeTrace.h>
@@ -144,7 +145,8 @@ bool Application::Initialize(HINSTANCE hInstance, int nCmdShow) {
createParams.title = kWindowTitle;
createParams.showCommand = nCmdShow;
createParams.primary = true;
createParams.autoCaptureOnStartup = true;
createParams.autoCaptureOnStartup =
App::IsEnvironmentFlagEnabled("XCUI_AUTO_CAPTURE_ON_STARTUP");
if (m_windowManager->CreateEditorWindow(
m_editorContext->BuildWorkspaceController(),
createParams) == nullptr) {