summaryrefslogtreecommitdiff
path: root/Libraries/LibGUI
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-10-02 20:24:03 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-10-02 20:24:03 +0200
commit7e2b9c3c40fe20e9044eefe6ff3e380152674eac (patch)
tree7a38e23e8dbaeb60759ffc0561f3835827557e3c /Libraries/LibGUI
parent3f2c1a2e3dc10cad23cb9127b2f4cd0b8550ac40 (diff)
downloadserenity-7e2b9c3c40fe20e9044eefe6ff3e380152674eac.zip
GWidget: Dispatch Show and Hide events when widget visibility changes
Diffstat (limited to 'Libraries/LibGUI')
-rw-r--r--Libraries/LibGUI/GWidget.cpp8
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