diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-10-02 20:24:03 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-10-02 20:24:03 +0200 |
commit | 7e2b9c3c40fe20e9044eefe6ff3e380152674eac (patch) | |
tree | 7a38e23e8dbaeb60759ffc0561f3835827557e3c /Libraries/LibGUI | |
parent | 3f2c1a2e3dc10cad23cb9127b2f4cd0b8550ac40 (diff) | |
download | serenity-7e2b9c3c40fe20e9044eefe6ff3e380152674eac.zip |
GWidget: Dispatch Show and Hide events when widget visibility changes
Diffstat (limited to 'Libraries/LibGUI')
-rw-r--r-- | Libraries/LibGUI/GWidget.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
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 |