diff options
author | atwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-19 20:26:25 +0000 |
---|---|---|
committer | atwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-19 20:26:25 +0000 |
commit | 4524c4ef3440e002b883e1734c32a04481881234 (patch) | |
tree | 9990728f53add358bb001a80a8c14907fae77669 /chrome/browser/browser_list_gtk.cc | |
parent | 73af75b40d24edbcbb3a6060e4a130dca5b1540f (diff) | |
download | chromium_src-4524c4ef3440e002b883e1734c32a04481881234.zip chromium_src-4524c4ef3440e002b883e1734c32a04481881234.tar.gz chromium_src-4524c4ef3440e002b883e1734c32a04481881234.tar.bz2 |
Only auto-close dialogs when last browser closes.
Update GTK version of BrowserList::AllBrowsersClosed() to only close widgets
that pass the GTK_IS_DIALOG() filter to avoid prematurely closing status icons.
BUG=49391
TEST=none (unit test is part of a pending CL)
Review URL: http://codereview.chromium.org/3040006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52945 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_list_gtk.cc')
-rw-r--r-- | chrome/browser/browser_list_gtk.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/browser/browser_list_gtk.cc b/chrome/browser/browser_list_gtk.cc index cf74096..8633121 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); |