From 07d662aafc25b145eb20e4123ebc82b5736cdeb7 Mon Sep 17 00:00:00 2001 From: Yuqian Yang Date: Sun, 16 Nov 2025 14:09:50 +0800 Subject: New timer impl on Windows. Add Event test. Fix delete later. --- src/ui/controls/TextHostControlService.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/ui/controls/TextHostControlService.cpp') diff --git a/src/ui/controls/TextHostControlService.cpp b/src/ui/controls/TextHostControlService.cpp index 235e6e6a..f581d3c9 100644 --- a/src/ui/controls/TextHostControlService.cpp +++ b/src/ui/controls/TextHostControlService.cpp @@ -12,7 +12,6 @@ #include "cru/platform/gui/Window.h" #include "cru/ui/Base.h" #include "cru/ui/DebugFlags.h" -#include "cru/ui/DeleteLater.h" #include "cru/ui/components/Menu.h" #include "cru/ui/helper/ShortcutHub.h" #include "cru/ui/host/WindowHost.h" @@ -149,7 +148,8 @@ std::vector TextControlMovePattern::kDefaultPatterns = { TextHostControlService::TextHostControlService(Control* control) : control_(control), - text_host_control_(dynamic_cast(control)) { + text_host_control_(dynamic_cast(control)), + context_menu_(new components::PopupMenu()) { SetUpShortcuts(); SetupOneHandler(&Control::MouseMoveEvent, @@ -699,7 +699,7 @@ void TextHostControlService::SetUpShortcuts() { void TextHostControlService::OpenContextMenu(const Point& position, ContextMenuItem items) { - context_menu_ = MakeDeleteLater(); + CRU_LOG_TAG_DEBUG("Open context menu."); auto menu = context_menu_->GetMenu(); if (items & ContextMenuItem::kSelectAll) { menu->AddTextItem("Select All", [this] { this->SelectAll(); }); -- cgit v1.2.3