Chromium Code Reviews| 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 96c9e58c484289d94d6acfa8a7b71047a3caa11c..331dabf0a685175b205819f48c5e2ce712f11cf4 100644 |
| --- a/ui/views/widget/native_widget_aura.cc |
| +++ b/ui/views/widget/native_widget_aura.cc |
| @@ -585,7 +585,18 @@ bool NativeWidgetAura::IsMinimized() const { |
| } |
| void NativeWidgetAura::Restore() { |
| - window_->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL); |
| + gfx::Rect* restore_bounds = |
| + window_->GetProperty(aura::client::kRestoreBoundsKey); |
| + // If the windows state is already normal, but there is a restore bounds |
| + // stored, we might are on Left/Right maximize mode and only need to restore |
|
sky
2012/08/28 15:38:36
Remember there is more than just left/right maximi
Mr4D (OOO till 08-26)
2012/08/28 19:40:53
I asked before starting this CL if it could be tha
|
| + if (restore_bounds && !IsMinimized() && !IsMaximized() && !IsFullscreen()) { |
| + // Since there is a restore bound, but no extreme state set, this has to be |
| + // a L/R maximized mode restore. |
| + SetBounds(*restore_bounds); |
| + window_->ClearProperty(aura::client::kRestoreBoundsKey); |
| + } else { |
| + window_->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL); |
| + } |
| } |
| void NativeWidgetAura::SetFullscreen(bool fullscreen) { |