diff options
author | mdm@chromium.org <mdm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-22 16:44:14 +0000 |
---|---|---|
committer | mdm@chromium.org <mdm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-22 16:44:14 +0000 |
commit | d5c465a59fd6ef2f5954a00087f2e424673e7d2b (patch) | |
tree | 7f95ad23638644cf8d23f3576d39649ce9187b02 /chrome/browser/gtk | |
parent | ce4056a1697df5bd050d70bff7f7dd2b741eafe8 (diff) | |
download | chromium_src-d5c465a59fd6ef2f5954a00087f2e424673e7d2b.zip chromium_src-d5c465a59fd6ef2f5954a00087f2e424673e7d2b.tar.gz chromium_src-d5c465a59fd6ef2f5954a00087f2e424673e7d2b.tar.bz2 |
Linux: correctly update window restore bounds.
This makes creating a new window after maximizing an existing window work as intended (reliably).
BUG=15102
TEST=create a new window after maximizing an existing window on sawfish; the new window should not be maximized
Review URL: http://codereview.chromium.org/212046
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26821 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk')
-rw-r--r-- | chrome/browser/gtk/browser_window_gtk.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/chrome/browser/gtk/browser_window_gtk.cc b/chrome/browser/gtk/browser_window_gtk.cc index eea9e7e..5d9486e 100644 --- a/chrome/browser/gtk/browser_window_gtk.cc +++ b/chrome/browser/gtk/browser_window_gtk.cc @@ -1319,9 +1319,12 @@ void BrowserWindowGtk::OnBoundsChanged(const gfx::Rect& bounds) { if (bounds_.size() != bounds.size()) OnSizeChanged(bounds.width(), bounds.height()); + // We update |bounds_| but not |restored_bounds_| here. The latter needs + // to be updated conditionally when the window is non-maximized and non- + // fullscreen, but whether those state updates have been processed yet is + // window-manager specific. We update |restored_bounds_| in the debounced + // handler below, after the window state has been updated. bounds_ = bounds; - if (!IsFullscreen() && !IsMaximized()) - restored_bounds_ = bounds; // When a window is moved or resized, GTK will call MainWindowConfigured() // above. The GdkEventConfigure* that it gets doesn't have quite the right @@ -1346,7 +1349,7 @@ void BrowserWindowGtk::OnDebouncedBoundsChanged() { gfx::Point origin(x, y); bounds_.set_origin(origin); if (!IsFullscreen() && !IsMaximized()) - restored_bounds_.set_origin(origin); + restored_bounds_ = bounds_; SaveWindowPosition(); } |