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

Unified Diff: chrome/browser/gtk/browser_window_gtk.cc

Issue 212046: Linux: correctly update window restore bounds. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/browser_window_gtk.cc
===================================================================
--- chrome/browser/gtk/browser_window_gtk.cc (revision 26750)
+++ chrome/browser/gtk/browser_window_gtk.cc (working copy)
@@ -1319,9 +1319,12 @@
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 @@
gfx::Point origin(x, y);
bounds_.set_origin(origin);
if (!IsFullscreen() && !IsMaximized())
- restored_bounds_.set_origin(origin);
+ restored_bounds_ = bounds_;
SaveWindowPosition();
}
« 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