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

@@ -13,7 +13,6 @@
#include <algorithm>
#include <sstream>
#include <windowsx.h>
#include "Composition/EditorShellPointerInteraction.h"
#include <XCEngine/UI/DrawData.h>
#include <cstdint>
#include <utility>
@@ -730,13 +729,12 @@ void EditorWindow::SyncShellCapturedPointerButtonsFromSystemState() {
}
void EditorWindow::ApplyShellRuntimePointerCapture() {
const EditorShellPointerOwner owner = m_runtime->GetShellRuntime().GetPointerOwner();
if (IsShellPointerOwner(owner)) {
if (m_runtime->GetShellRuntime().HasShellInteractiveCapture()) {
AcquirePointerCapture(EditorWindowPointerCaptureOwner::Shell);
return;
}
if (IsHostedContentPointerOwner(owner)) {
if (m_runtime->GetShellRuntime().HasHostedContentCapture()) {
AcquirePointerCapture(EditorWindowPointerCaptureOwner::HostedContent);
return;
}