terminal: Use widget->window() instead of the App's main window
This commit is contained in:
parent
cc3be43633
commit
bd5a231936
@ -40,7 +40,7 @@ Result<void> 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<void> 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)
|
||||
|
Loading…
Reference in New Issue
Block a user