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

Unified Diff: ui/views/widget/native_widget_aura.cc

Issue 1130033003: Make the minimize state work when creating a chrome window in CrOS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add test case Created 5 years, 6 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
Index: ui/views/widget/native_widget_aura.cc
diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc
index b4e7fc414d70d90c04527f1f71983cdc6ee4cc28..70176ce0b7594657cee3024c1b98a3b1093220e1 100644
--- a/ui/views/widget/native_widget_aura.cc
+++ b/ui/views/widget/native_widget_aura.cc
@@ -484,8 +484,7 @@ void NativeWidgetAura::ShowWithWindowState(ui::WindowShowState state) {
if (!window_)
return;
- if (state == ui::SHOW_STATE_MAXIMIZED || state == ui::SHOW_STATE_FULLSCREEN)
- window_->SetProperty(aura::client::kShowStateKey, state);
+ window_->SetProperty(aura::client::kShowStateKey, state);
window_->Show();
if (delegate_->CanActivate()) {
if (state != ui::SHOW_STATE_INACTIVE)
@@ -495,6 +494,11 @@ void NativeWidgetAura::ShowWithWindowState(ui::WindowShowState state) {
// do the right thing.
SetInitialFocus(state);
}
+
+ // On desktop aura, a window is activated first even when it is shown as
+ // minimized. Do the same for consistency.
+ if (state == ui::SHOW_STATE_MINIMIZED)
+ Minimize();
}
bool NativeWidgetAura::IsVisible() const {

Powered by Google App Engine
This is Rietveld 408576698