From eeb1f55d5a483720441c3f44e83d02cc882a3bc0 Mon Sep 17 00:00:00 2001 From: crupest Date: Sun, 21 Nov 2021 15:18:28 +0800 Subject: ... --- src/ui/host/WindowHost.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/ui/host') diff --git a/src/ui/host/WindowHost.cpp b/src/ui/host/WindowHost.cpp index 3f3976b4..034d9bd8 100644 --- a/src/ui/host/WindowHost.cpp +++ b/src/ui/host/WindowHost.cpp @@ -8,7 +8,6 @@ #include "cru/platform/gui/UiApplication.hpp" #include "cru/platform/gui/Window.hpp" #include "cru/ui/DebugFlags.hpp" -#include "cru/ui/controls/Window.hpp" #include "cru/ui/host/LayoutPaintCycler.hpp" #include "cru/ui/render/MeasureRequirement.hpp" #include "cru/ui/render/RenderObject.hpp" @@ -104,8 +103,7 @@ inline void BindNativeEvent( } } // namespace -WindowHost::WindowHost(controls::Control* root_control, - CreateWindowParams params) +WindowHost::WindowHost(controls::Control* root_control) : root_control_(root_control), focus_control_(root_control) { root_control_->TraverseDescendants([this](controls::Control* control) { control->window_host_ = this; @@ -117,17 +115,16 @@ WindowHost::WindowHost(controls::Control* root_control, this->layout_paint_cycler_ = std::make_unique(this); - CreateNativeWindow(params); + CreateNativeWindow(); } WindowHost::~WindowHost() {} -gsl::not_null WindowHost::CreateNativeWindow( - CreateWindowParams create_window_params) { +gsl::not_null WindowHost::CreateNativeWindow() { const auto ui_application = IUiApplication::GetInstance(); - auto native_window = ui_application->CreateWindow(create_window_params.parent, - create_window_params.flag); + auto native_window = ui_application->CreateWindow(); + Ensures(native_window); native_window_ = native_window; -- cgit v1.2.3