Commit f178cc72 authored by mdm@chromium.org's avatar mdm@chromium.org

Linux: use the bounds from the most recent BrowserWindowGtk::OnConfigure()...

Linux: use the bounds from the most recent BrowserWindowGtk::OnConfigure() call to figure out whether to return early in a later call, rather than bounds that may also be updated by a debounced callback with different (but more accurate, for some window managers) values.

BUG=112041

Review URL: http://codereview.chromium.org/9307018

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120050 0039d316-1c4b-4281-b951-d872f2087c98
parent 338ecf46
......@@ -1472,7 +1472,7 @@ gboolean BrowserWindowGtk::OnConfigure(GtkWidget* widget,
// When the window moves, we'll get multiple configure-event signals. We can
// also get events when the bounds haven't changed, but the window's stacking
// has, which we aren't interested in. http://crbug.com/70125
if (bounds == bounds_)
if (bounds == configure_bounds_)
return FALSE;
GetLocationBar()->location_entry()->ClosePopup();
......@@ -1491,6 +1491,7 @@ gboolean BrowserWindowGtk::OnConfigure(GtkWidget* widget,
// window-manager specific. We update |restored_bounds_| in the debounced
// handler below, after the window state has been updated.
bounds_ = bounds;
configure_bounds_ = bounds;
// The GdkEventConfigure* we get here doesn't have quite the right
// coordinates though (they're relative to the drawable window area, rather
......@@ -1748,7 +1749,9 @@ void BrowserWindowGtk::ConnectHandlersToSignals() {
void BrowserWindowGtk::InitWidgets() {
ConnectHandlersToSignals();
bounds_ = restored_bounds_ = GetInitialWindowBounds(window_);
bounds_ = configure_bounds_ = restored_bounds_ =
GetInitialWindowBounds(window_);
// This vbox encompasses all of the widgets within the browser. This is
// everything except the custom frame border.
......
......@@ -454,6 +454,10 @@ class BrowserWindowGtk : public BrowserWindow,
// The position and size of the current window.
gfx::Rect bounds_;
// The configure bounds of the current window, used to figure out whether to
// ignore later configure events. See OnConfigure() for more information.
gfx::Rect configure_bounds_;
// The position and size of the non-maximized, non-fullscreen window.
gfx::Rect restored_bounds_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment