Chromium Code Reviews| Index: chrome/browser/gtk/browser_window_gtk.cc |
| diff --git a/chrome/browser/gtk/browser_window_gtk.cc b/chrome/browser/gtk/browser_window_gtk.cc |
| index 1b52db83abd0b3f205b9b1550f8bf3bb8c5e1c48..c456c327a3bd7fad38d9e5598d1cb5e6402f2fd5 100644 |
| --- a/chrome/browser/gtk/browser_window_gtk.cc |
| +++ b/chrome/browser/gtk/browser_window_gtk.cc |
| @@ -439,6 +439,15 @@ gboolean BrowserWindowGtk::OnCustomFrameExpose(GtkWidget* widget, |
| void BrowserWindowGtk::Show() { |
| gtk_widget_show(GTK_WIDGET(window_)); |
| + |
| + // The Browser associated with this browser window must become the active |
| + // browser at the time Show() is called. This is the natural behaviour under |
| + // windows, but gtk_widget_show won't show the widget (and therefore won't |
|
Evan Martin
2009/06/24 20:00:36
s/windows/Windows/
to make it clear that you're ta
|
| + // call OnFocusIn()) until we return to the runloop. Therefore any calls to |
| + // BrowserList::GetLastActive() (for example, in bookmark_util), will return |
| + // the previous browser instead of the if we don't explicitly set it here. |
|
Evan Martin
2009/06/24 20:00:36
typo "the if"
|
| + BrowserList::SetLastActive(browser()); |
| + |
| #if defined(LINUX2) |
| TabOverviewTypes::instance()->SetWindowType( |
| GTK_WIDGET(window_), TabOverviewTypes::WINDOW_TYPE_CHROME_TOPLEVEL, |