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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/gtk/browser_window_gtk.h" 5 #include "chrome/browser/gtk/browser_window_gtk.h"
6 6
7 #include <gdk/gdkkeysyms.h> 7 #include <gdk/gdkkeysyms.h>
8 #include <X11/XF86keysym.h> 8 #include <X11/XF86keysym.h>
9 9
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 } 432 }
433 433
434 custom_frame_border->RenderToWidget(widget); 434 custom_frame_border->RenderToWidget(widget);
435 } 435 }
436 436
437 return FALSE; // Allow subwidgets to paint. 437 return FALSE; // Allow subwidgets to paint.
438 } 438 }
439 439
440 void BrowserWindowGtk::Show() { 440 void BrowserWindowGtk::Show() {
441 gtk_widget_show(GTK_WIDGET(window_)); 441 gtk_widget_show(GTK_WIDGET(window_));
442
443 // The Browser associated with this browser window must become the active
444 // browser at the time Show() is called. This is the natural behaviour under
445 // 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
446 // call OnFocusIn()) until we return to the runloop. Therefore any calls to
447 // BrowserList::GetLastActive() (for example, in bookmark_util), will return
448 // 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"
449 BrowserList::SetLastActive(browser());
450
442 #if defined(LINUX2) 451 #if defined(LINUX2)
443 TabOverviewTypes::instance()->SetWindowType( 452 TabOverviewTypes::instance()->SetWindowType(
444 GTK_WIDGET(window_), TabOverviewTypes::WINDOW_TYPE_CHROME_TOPLEVEL, 453 GTK_WIDGET(window_), TabOverviewTypes::WINDOW_TYPE_CHROME_TOPLEVEL,
445 NULL); 454 NULL);
446 #endif 455 #endif
447 } 456 }
448 457
449 void BrowserWindowGtk::SetBounds(const gfx::Rect& bounds) { 458 void BrowserWindowGtk::SetBounds(const gfx::Rect& bounds) {
450 gint x = static_cast<gint>(bounds.x()); 459 gint x = static_cast<gint>(bounds.x());
451 gint y = static_cast<gint>(bounds.y()); 460 gint y = static_cast<gint>(bounds.y());
(...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after
1305 *edge = GDK_WINDOW_EDGE_NORTH_EAST; 1314 *edge = GDK_WINDOW_EDGE_NORTH_EAST;
1306 } else if (y < bounds_.height() - kResizeAreaCornerSize) { 1315 } else if (y < bounds_.height() - kResizeAreaCornerSize) {
1307 *edge = GDK_WINDOW_EDGE_EAST; 1316 *edge = GDK_WINDOW_EDGE_EAST;
1308 } else { 1317 } else {
1309 *edge = GDK_WINDOW_EDGE_SOUTH_EAST; 1318 *edge = GDK_WINDOW_EDGE_SOUTH_EAST;
1310 } 1319 }
1311 return true; 1320 return true;
1312 } 1321 }
1313 NOTREACHED(); 1322 NOTREACHED();
1314 } 1323 }
OLDNEW
« 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