mirror of
https://github.com/RGBCube/serenity
synced 2025-05-19 03:55:07 +00:00
LibGUI: Ignore GWidget::update() on invisible widgets.
This commit is contained in:
parent
bc3c199bb1
commit
20137e45f4
1 changed files with 3 additions and 0 deletions
|
@ -83,6 +83,7 @@ void GWidget::event(GEvent& event)
|
|||
|
||||
void GWidget::handle_paint_event(GPaintEvent& event)
|
||||
{
|
||||
ASSERT(is_visible());
|
||||
if (fill_with_background_color()) {
|
||||
Painter painter(*this);
|
||||
painter.fill_rect(event.rect(), background_color());
|
||||
|
@ -227,6 +228,8 @@ void GWidget::update()
|
|||
|
||||
void GWidget::update(const Rect& rect)
|
||||
{
|
||||
if (!is_visible())
|
||||
return;
|
||||
auto* w = window();
|
||||
if (!w)
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue