summaryrefslogtreecommitdiff
path: root/Libraries
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-07-23 20:51:08 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-07-23 20:51:08 +0200
commit356babaf96d6a06c2d3e93c6e54caec1cbc43231 (patch)
treec64bf184998b8b0c3a8f0778e7b1b5f4519bcf91 /Libraries
parent72a3f69df77465049387764bf29c0d0a92803a43 (diff)
downloadserenity-356babaf96d6a06c2d3e93c6e54caec1cbc43231.zip
LibGUI: Destroy tooltip windows when they are not used.
Cached tooltip windows were preventing the automatic event loop shutdown. It's not like we were gaining much by caching these anyway, since we only cached the GWindow, not anything on the WindowServer side.
Diffstat (limited to 'Libraries')
-rw-r--r--Libraries/LibGUI/GApplication.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Libraries/LibGUI/GApplication.cpp b/Libraries/LibGUI/GApplication.cpp
index d61a68b54d..eb7f930cd2 100644
--- a/Libraries/LibGUI/GApplication.cpp
+++ b/Libraries/LibGUI/GApplication.cpp
@@ -108,8 +108,11 @@ void GApplication::show_tooltip(const StringView& tooltip, const Point& screen_l
void GApplication::hide_tooltip()
{
- if (m_tooltip_window)
+ if (m_tooltip_window) {
m_tooltip_window->hide();
+ delete m_tooltip_window;
+ m_tooltip_window = nullptr;
+ }
}
void GApplication::did_delete_last_window(Badge<GWindow>)