summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/gtk/browser_window_gtk.cc15
1 files changed, 10 insertions, 5 deletions
diff --git a/chrome/browser/gtk/browser_window_gtk.cc b/chrome/browser/gtk/browser_window_gtk.cc
index 2c1bb32..46adb2f 100644
--- a/chrome/browser/gtk/browser_window_gtk.cc
+++ b/chrome/browser/gtk/browser_window_gtk.cc
@@ -1210,11 +1210,16 @@ void BrowserWindowGtk::DestroyBrowser() {
void BrowserWindowGtk::OnBoundsChanged(const gfx::Rect& bounds) {
GetLocationBar()->location_entry()->ClosePopup();
- // Notify the TabContents that the browser window has been resized or moved.
- // This is used to close AutoFill popups in the renderer.
- TabContents* tab_contents = browser_->GetSelectedTabContents();
- if (tab_contents)
- tab_contents->WindowMoveOrResizeStarted();
+ // Only notify the TabContents about the move or resize if we actually have
+ // moved or resized. We also don't need to notify for the initial
+ // configuration when the browser window is created.
+ if (!bounds_.IsEmpty() && !bounds_.Equals(bounds)) {
+ // Notify the TabContents that the browser window has been resized or moved.
+ // This is used to close AutoFill popups in the renderer.
+ TabContents* tab_contents = browser_->GetSelectedTabContents();
+ if (tab_contents)
+ tab_contents->WindowMoveOrResizeStarted();
+ }
if (bounds_.size() != bounds.size())
OnSizeChanged(bounds.width(), bounds.height());