new_editor: reduce app shell capture plumbing

This commit is contained in:
2026-04-22 16:34:28 +08:00
parent 2c2a8b8669
commit c42fd4d48b
12 changed files with 101 additions and 174 deletions

View File

@@ -3,6 +3,7 @@
#include "Ports/ViewportRenderPort.h"
#include "Composition/EditorContext.h"
#include "Composition/EditorPanelIds.h"
#include <XCEditor/Shell/UIEditorShellCapturePolicy.h>
#include <XCEngine/Rendering/RenderContext.h>
namespace XCEngine::UI::Editor::App {
@@ -127,31 +128,17 @@ UIEditorDockHostTabDropTarget EditorShellRuntime::ResolveDockTabDropTarget(
point);
}
EditorShellPointerOwner EditorShellRuntime::GetPointerOwner() const {
return m_hostedPanelCoordinator.ResolvePointerOwner(
m_shellInteractionState,
m_hierarchyPanel,
m_projectPanel);
}
bool EditorShellRuntime::WantsHostPointerCapture() const {
return IsHostedContentPointerOwner(GetPointerOwner());
}
bool EditorShellRuntime::WantsHostPointerRelease() const {
return !IsHostedContentPointerOwner(GetPointerOwner());
}
bool EditorShellRuntime::HasHostedContentCapture() const {
return IsHostedContentPointerOwner(GetPointerOwner());
return m_hierarchyPanel.HasActivePointerCapture() ||
m_projectPanel.HasActivePointerCapture();
}
bool EditorShellRuntime::HasShellInteractiveCapture() const {
return IsShellPointerOwner(GetPointerOwner());
return HasActiveUIEditorShellInteractiveCapture(m_shellInteractionState);
}
bool EditorShellRuntime::HasInteractiveCapture() const {
return GetPointerOwner() != EditorShellPointerOwner::None;
return HasHostedContentCapture() || HasShellInteractiveCapture();
}
} // namespace XCEngine::UI::Editor::App