mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 03:37:53 +00:00
SystemMonitor: Don't generate backtraces while not looking at them
This commit is contained in:
@@ -37,21 +37,30 @@ ThreadStackWidget::ThreadStackWidget()
|
||||
layout()->set_margins({ 4, 4, 4, 4 });
|
||||
m_stack_editor = add<GUI::TextEditor>();
|
||||
m_stack_editor->set_mode(GUI::TextEditor::ReadOnly);
|
||||
|
||||
m_timer = add<Core::Timer>(1000, [this] { refresh(); });
|
||||
}
|
||||
|
||||
ThreadStackWidget::~ThreadStackWidget()
|
||||
{
|
||||
}
|
||||
|
||||
void ThreadStackWidget::show_event(GUI::ShowEvent&)
|
||||
{
|
||||
refresh();
|
||||
if (!m_timer)
|
||||
m_timer = add<Core::Timer>(1000, [this] { refresh(); });
|
||||
}
|
||||
|
||||
void ThreadStackWidget::hide_event(GUI::HideEvent&)
|
||||
{
|
||||
m_timer = nullptr;
|
||||
}
|
||||
|
||||
void ThreadStackWidget::set_ids(pid_t pid, pid_t tid)
|
||||
{
|
||||
if (m_pid == pid && m_tid == tid)
|
||||
return;
|
||||
m_pid = pid;
|
||||
m_tid = tid;
|
||||
refresh();
|
||||
}
|
||||
|
||||
void ThreadStackWidget::refresh()
|
||||
|
||||
Reference in New Issue
Block a user