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

Side by Side Diff: chrome/browser/gtk/browser_window_gtk.cc

Issue 160149: Gtk: gtk_window_present when an already-showing browser window is showing and... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 11 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 unified diff | Download patch | Annotate | Revision Log
« 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 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 if (browser_->type() == Browser::TYPE_POPUP) { 506 if (browser_->type() == Browser::TYPE_POPUP) {
507 panel_controller_ = new PanelController(this); 507 panel_controller_ = new PanelController(this);
508 } else { 508 } else {
509 TabOverviewTypes::instance()->SetWindowType( 509 TabOverviewTypes::instance()->SetWindowType(
510 GTK_WIDGET(window_), 510 GTK_WIDGET(window_),
511 TabOverviewTypes::WINDOW_TYPE_CHROME_TOPLEVEL, 511 TabOverviewTypes::WINDOW_TYPE_CHROME_TOPLEVEL,
512 NULL); 512 NULL);
513 } 513 }
514 #endif 514 #endif
515 515
516 gtk_widget_show(GTK_WIDGET(window_)); 516 // If we are not already visible, this will just show the window.
517 gtk_window_present(window_);
517 } 518 }
518 519
519 void BrowserWindowGtk::SetBounds(const gfx::Rect& bounds) { 520 void BrowserWindowGtk::SetBounds(const gfx::Rect& bounds) {
520 gint x = static_cast<gint>(bounds.x()); 521 gint x = static_cast<gint>(bounds.x());
521 gint y = static_cast<gint>(bounds.y()); 522 gint y = static_cast<gint>(bounds.y());
522 gint width = static_cast<gint>(bounds.width()); 523 gint width = static_cast<gint>(bounds.width());
523 gint height = static_cast<gint>(bounds.height()); 524 gint height = static_cast<gint>(bounds.height());
524 525
525 gtk_window_move(window_, x, y); 526 gtk_window_move(window_, x, y);
526 gtk_window_resize(window_, width, height); 527 gtk_window_resize(window_, width, height);
(...skipping 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after
1573 *edge = GDK_WINDOW_EDGE_NORTH_EAST; 1574 *edge = GDK_WINDOW_EDGE_NORTH_EAST;
1574 } else if (y < bounds_.height() - kResizeAreaCornerSize) { 1575 } else if (y < bounds_.height() - kResizeAreaCornerSize) {
1575 *edge = GDK_WINDOW_EDGE_EAST; 1576 *edge = GDK_WINDOW_EDGE_EAST;
1576 } else { 1577 } else {
1577 *edge = GDK_WINDOW_EDGE_SOUTH_EAST; 1578 *edge = GDK_WINDOW_EDGE_SOUTH_EAST;
1578 } 1579 }
1579 return true; 1580 return true;
1580 } 1581 }
1581 NOTREACHED(); 1582 NOTREACHED();
1582 } 1583 }
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