From 20137e45f487ad3a9314e96de2f24e9676184134 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 25 Mar 2019 13:58:30 +0100 Subject: [PATCH] LibGUI: Ignore GWidget::update() on invisible widgets. --- LibGUI/GWidget.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/LibGUI/GWidget.cpp b/LibGUI/GWidget.cpp index fc5177ebdd..f78ec48ebf 100644 --- a/LibGUI/GWidget.cpp +++ b/LibGUI/GWidget.cpp @@ -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;