Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(243)

Unified Diff: chrome/browser/browser_list_gtk.cc

Issue 3040006: Only auto-close dialogs when last browser closes. (Closed)
Patch Set: Remove code accidentally brought over from other CL Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698