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 8435698b4ac1131132905a817dd0ed2af272dd40..7b3813c3c67f5db8daf94a562dc77b50369b64d8 100644 |
| --- a/ui/views/widget/native_widget_aura.cc |
| +++ b/ui/views/widget/native_widget_aura.cc |
| @@ -409,6 +409,11 @@ gfx::Rect NativeWidgetAura::GetClientAreaScreenBounds() const { |
| } |
| gfx::Rect NativeWidgetAura::GetRestoredBounds() const { |
| + // Restored bounds should only be relevant if the window is minimized or |
| + // maximized. However, in some places the code expectes GetRestoredBounds() |
| + // to return the current window bounds if the window is not in either state. |
| + if (!IsMinimized() && !IsMaximized()) |
|
oshima
2012/02/24 21:24:59
I believe you need to check IsFullScreen() as well
stevenjb
2012/02/24 21:50:45
Ugh, you're right, didn't realize that was a widge
|
| + return window_->bounds(); |
| gfx::Rect* restore_bounds = |
| window_->GetProperty(aura::client::kRestoreBoundsKey); |
| return restore_bounds ? *restore_bounds : window_->bounds(); |
| @@ -517,8 +522,9 @@ void NativeWidgetAura::Maximize() { |
| } |
| void NativeWidgetAura::Minimize() { |
| - // No minimized window for aura. crbug.com/104571. |
| - NOTREACHED(); |
| + // Note: This currently does not do anything except set the property, |
| + // see crbug.com/104571. |
| + window_->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MINIMIZED); |
| } |
| bool NativeWidgetAura::IsMaximized() const { |