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

Unified Diff: chrome/browser/gtk/browser_window_gtk.cc

Issue 147091: GTK: When a browser is shown to the user, it should immediatly become the (Closed)
Patch Set: Close paren in comment. Created 11 years, 6 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/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,
« 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