summaryrefslogtreecommitdiff
path: root/vcl/win/source/window/salframe.cxx
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2005-09-28 14:10:05 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2005-09-28 14:10:05 +0000
commitc884cefb39ecad50694e5d5072178afc44d24453 (patch)
treea81ab4f8dcbb3db652aaf05828fc8c9770415d2b /vcl/win/source/window/salframe.cxx
parent8f7fdac5280c018da469c9ee387566014a844827 (diff)
INTEGRATION: CWS vcl39 (1.114.70); FILE MERGED
2005/08/02 14:20:25 pl 1.114.70.2: RESYNC: (1.116-1.117); FILE MERGED 2005/03/23 15:21:26 ssa 1.114.70.1: #i42485# use proper parent position when transforming coordinates with maximized parent window
Diffstat (limited to 'vcl/win/source/window/salframe.cxx')
-rw-r--r--vcl/win/source/window/salframe.cxx19
1 files changed, 16 insertions, 3 deletions
diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx
index e19707d1fd44..825a7552b43c 100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: salframe.cxx,v $
*
- * $Revision: 1.118 $
+ * $Revision: 1.119 $
*
- * last change: $Author: rt $ $Date: 2005-09-09 14:08:44 $
+ * last change: $Author: hr $ $Date: 2005-09-28 15:10:05 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -1424,7 +1424,20 @@ void WinSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight,
POINT aPt;
aPt.x = nX;
aPt.y = nY;
- ClientToScreen( ImplGetParentHwnd( mhWnd ), &aPt );
+
+ HWND parentHwnd = ImplGetParentHwnd( mhWnd );
+ WinSalFrame* pParentFrame = GetWindowPtr( parentHwnd );
+ if ( pParentFrame && pParentFrame->mnShowState == SW_SHOWMAXIMIZED )
+ {
+ // #i42485#: parent will be shown maximized in which case
+ // a ClientToScreen uses the wrong coordinates (i.e. those from the restore pos)
+ // so use the (already updated) frame geometry for the transformation
+ aPt.x += pParentFrame->maGeometry.nX;
+ aPt.y += pParentFrame->maGeometry.nY;
+ }
+ else
+ ClientToScreen( parentHwnd, &aPt );
+
nX = aPt.x;
nY = aPt.y;
}