From 6ded7247e04315f090b5667f6815904f54b537b9 Mon Sep 17 00:00:00 2001 From: apio Date: Fri, 29 Mar 2024 20:17:51 +0100 Subject: [PATCH] terminal: Use widget->window() instead of the App's main window --- terminal/TerminalWidget.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/terminal/TerminalWidget.cpp b/terminal/TerminalWidget.cpp index d26d9b7a..11db8b85 100644 --- a/terminal/TerminalWidget.cpp +++ b/terminal/TerminalWidget.cpp @@ -40,7 +40,7 @@ Result TerminalWidget::init(char* const* args) m_font = ui::Font::default_font(); m_bold_font = ui::Font::default_bold_font(); - m_terminal_canvas = ui::App::the().main_window()->canvas(); + m_terminal_canvas = window()->canvas(); m_terminal_canvas.fill(ui::BLACK); m_cursor_timer = TRY(os::Timer::create_repeating(500, [this]() { this->tick_cursor(); })); @@ -102,7 +102,7 @@ Result TerminalWidget::process() if (did_draw) drawn++; } - if (drawn > 0) ui::App::the().main_window()->draw(); + if (drawn > 0) window()->draw(); return {}; } @@ -117,7 +117,7 @@ void TerminalWidget::tick_cursor() else erase_current_char(); - ui::App::the().main_window()->draw(); + window()->draw(); } void TerminalWidget::draw_glyph(wchar_t c, int x, int y)