mirror of
https://github.com/RGBCube/serenity
synced 2025-05-19 21:55:07 +00:00
LibGUI: Don't fire visibility-tracking timers in non-visible widgets
We were already avoiding firing timers within non-visible *windows*. This patch extends the mechanism to support timers within non-visible *widgets*.
This commit is contained in:
parent
9f1f3c6f37
commit
27fecf57bd
2 changed files with 7 additions and 0 deletions
|
@ -1114,4 +1114,9 @@ bool Widget::has_pending_drop() const
|
||||||
return Application::the()->pending_drop_widget() == this;
|
return Application::the()->pending_drop_widget() == this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Widget::is_visible_for_timer_purposes() const
|
||||||
|
{
|
||||||
|
return is_visible();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,6 +108,8 @@ public:
|
||||||
set_max_height(height);
|
set_max_height(height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual bool is_visible_for_timer_purposes() const override;
|
||||||
|
|
||||||
bool has_tooltip() const { return !m_tooltip.is_empty(); }
|
bool has_tooltip() const { return !m_tooltip.is_empty(); }
|
||||||
String tooltip() const { return m_tooltip; }
|
String tooltip() const { return m_tooltip; }
|
||||||
void set_tooltip(String);
|
void set_tooltip(String);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue