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

Unified Diff: extensions/browser/app_window/app_window.cc

Issue 1947993002: Do not save the position after the window is hidden Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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: extensions/browser/app_window/app_window.cc
diff --git a/extensions/browser/app_window/app_window.cc b/extensions/browser/app_window/app_window.cc
index 08d2e56127789ace1e1021c84167de0af0e59140..5989d61730ec9a6abd5e5ac7079216706c493414 100644
--- a/extensions/browser/app_window/app_window.cc
+++ b/extensions/browser/app_window/app_window.cc
@@ -61,6 +61,8 @@
#include "extensions/browser/pref_names.h"
#endif
+#include "ui/aura/window.h"
+
using content::BrowserContext;
using content::ConsoleMessageLevel;
using content::WebContents;
@@ -504,7 +506,9 @@ void AppWindow::OnNativeWindowChanged() {
RestoreAlwaysOnTop(); // Same as in SetNativeWindowFullscreen.
#endif
- SaveWindowPosition();
+ // Do not update the position when the window is no longer visible.
+ if (native_app_window_->GetNativeWindow()->IsVisible())
+ SaveWindowPosition();
#if defined(OS_WIN)
if (cached_always_on_top_ && !IsFullscreen() &&
« 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