summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorPhilipp Lohmann [pl] <Philipp.Lohmann@Sun.COM>2010-09-28 18:35:10 +0300
committerTor Lillqvist <tml@hemulen.(none)>2010-09-28 22:13:49 +0300
commit13b0fc7375271ed58f563306ef57f81808ac9289 (patch)
tree24e1f1f35bacbe9045e52af420ed3fd9704602fc /vcl
parentda4b631586405f189864db20305607550674dec5 (diff)
vcl115: #i89397# update state rect also in maximized case
Diffstat (limited to 'vcl')
-rw-r--r--vcl/win/source/window/salframe.cxx19
1 files changed, 19 insertions, 0 deletions
diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx
index 09ba5681e234..f0ca1d68ef41 100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -182,6 +182,25 @@ static void ImplSaveFrameState( WinSalFrame* pFrame )
if ( bVisible )
pFrame->mnShowState = SW_SHOWMAXIMIZED;
pFrame->mbRestoreMaximize = TRUE;
+
+ WINDOWPLACEMENT aPlacement;
+ aPlacement.length = sizeof(aPlacement);
+ if( GetWindowPlacement( pFrame->mhWnd, &aPlacement ) )
+ {
+ RECT aRect = aPlacement.rcNormalPosition;
+ RECT aRect2 = aRect;
+ AdjustWindowRectEx( &aRect2, GetWindowStyle( pFrame->mhWnd ),
+ FALSE, GetWindowExStyle( pFrame->mhWnd ) );
+ long nTopDeco = abs( aRect.top - aRect2.top );
+ long nLeftDeco = abs( aRect.left - aRect2.left );
+ long nBottomDeco = abs( aRect.bottom - aRect2.bottom );
+ long nRightDeco = abs( aRect.right - aRect2.right );
+
+ pFrame->maState.mnX = aRect.left + nLeftDeco;
+ pFrame->maState.mnY = aRect.top + nTopDeco;
+ pFrame->maState.mnWidth = aRect.right - aRect.left - nLeftDeco - nRightDeco;
+ pFrame->maState.mnHeight = aRect.bottom - aRect.top - nTopDeco - nBottomDeco;
+ }
}
else
{