From 356babaf96d6a06c2d3e93c6e54caec1cbc43231 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 23 Jul 2019 20:51:08 +0200 Subject: [PATCH] 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. --- Libraries/LibGUI/GApplication.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Libraries/LibGUI/GApplication.cpp b/Libraries/LibGUI/GApplication.cpp index d61a68b54d5..eb7f930cd2b 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)