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.
This commit is contained in:
Andreas Kling 2019-07-23 20:51:08 +02:00
parent 72a3f69df7
commit 356babaf96
Notes: sideshowbarker 2024-07-19 13:05:03 +09:00

View File

@ -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>)