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 bf113e6e119de7bcb3ab99b2f21a1d185eba9ef7..5a914b3627d89061db578fd0306ca1538450406b 100644 |
--- a/ui/views/widget/native_widget_aura.cc |
+++ b/ui/views/widget/native_widget_aura.cc |
@@ -484,8 +484,23 @@ 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); |
+ switch (state) { |
+ case ui::SHOW_STATE_NORMAL: |
+ Restore(); |
+ break; |
+ case ui::SHOW_STATE_MAXIMIZED: |
+ Maximize(); |
+ break; |
+ case ui::SHOW_STATE_MINIMIZED: |
+ Minimize(); |
+ return; |
+ case ui::SHOW_STATE_FULLSCREEN: |
+ SetFullscreen(true); |
+ break; |
+ default: |
+ break; |
+ } |
+ |
sadrul
2015/05/15 20:30:54
Looks like you can just do window_->SetProperty()
oshima
2015/05/15 20:45:52
Yes, that should be sufficient. One caveat: IIRC,
|
window_->Show(); |
if (delegate_->CanActivate()) { |
if (state != ui::SHOW_STATE_INACTIVE) |