views: Return restored bounds when window is minimized, fixes #473.

On Window the minimized window would have a fake bounds that is out of
the screen, which is not consistent to other platforms' behavior.
This commit is contained in:
Cheng Zhao 2014-07-26 14:03:37 +08:00
parent ce50b38a75
commit cab00a1450

View file

@ -204,6 +204,11 @@ void NativeWindowViews::SetSize(const gfx::Size& size) {
}
gfx::Size NativeWindowViews::GetSize() {
#if defined(OS_WIN)
if (IsMinimized())
return window_->GetRestoredBounds().size();
#endif
return window_->GetWindowBoundsInScreen().size();
}
@ -287,6 +292,11 @@ void NativeWindowViews::SetPosition(const gfx::Point& position) {
}
gfx::Point NativeWindowViews::GetPosition() {
#if defined(OS_WIN)
if (IsMinimized())
return window_->GetRestoredBounds().origin();
#endif
return window_->GetWindowBoundsInScreen().origin();
}