From 7e2b9c3c40fe20e9044eefe6ff3e380152674eac Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 2 Oct 2019 20:24:03 +0200 Subject: [PATCH] GWidget: Dispatch Show and Hide events when widget visibility changes --- Libraries/LibGUI/GWidget.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Libraries/LibGUI/GWidget.cpp b/Libraries/LibGUI/GWidget.cpp index 1aa678c846..ae7f1a0c3a 100644 --- a/Libraries/LibGUI/GWidget.cpp +++ b/Libraries/LibGUI/GWidget.cpp @@ -456,6 +456,14 @@ void GWidget::set_visible(bool visible) parent->invalidate_layout(); if (m_visible) update(); + + if (m_visible) { + GShowEvent e; + event(e); + } else { + GHideEvent e; + event(e); + } } bool GWidget::spans_entire_window_horizontally() const