Przeglądaj źródła

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.
Andreas Kling 6 lat temu
rodzic
commit
356babaf96
1 zmienionych plików z 4 dodań i 1 usunięć
  1. 4 1
      Libraries/LibGUI/GApplication.cpp

+ 4 - 1
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>)