mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 11:44:58 +00:00
SystemMonitor: Don't generate backtraces while not looking at them
This commit is contained in:
parent
3bb36dbd3f
commit
cbc582e0df
2 changed files with 15 additions and 3 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue