Index: chrome/browser/browser_list_gtk.cc |
diff --git a/chrome/browser/browser_list_gtk.cc b/chrome/browser/browser_list_gtk.cc |
index cf74096e7676f354e9dd00a57aa1ce03ababb410..8633121575922ede24de409c8e8e6c97e5fb5c9c 100644 |
--- a/chrome/browser/browser_list_gtk.cc |
+++ b/chrome/browser/browser_list_gtk.cc |
@@ -16,7 +16,10 @@ void BrowserList::AllBrowsersClosed() { |
// We filter by visible widgets because there are toplevel windows that if |
// we try to destroy, we crash. For example, trying to destroy the tooltip |
// window or the toplevel associated with drop down windows crashes. |
- if (GTK_WIDGET_VISIBLE(GTK_WIDGET(window))) |
+ // We further filter to only close dialogs, as blindly closing all windows |
+ // causes problems with things like status icons. |
+ if (GTK_WIDGET_VISIBLE(GTK_WIDGET(window)) && |
+ (GTK_IS_DIALOG(GTK_WIDGET(window)))) |
gtk_widget_destroy(GTK_WIDGET(window)); |
} |
g_list_foreach(window_list, (GFunc)g_object_unref, NULL); |