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:
parent
ce50b38a75
commit
cab00a1450
1 changed files with 10 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue