#96972# changed GetPosPixel for frames

This commit is contained in:
Stephan Schäfer
2002-04-16 06:58:29 +00:00
parent bcaa2e6597
commit 5d3128fd92
2 changed files with 18 additions and 6 deletions

View File

@@ -2,9 +2,9 @@
*
* $RCSfile: floatwin.cxx,v $
*
* $Revision: 1.12 $
* $Revision: 1.13 $
*
* last change: $Author: ssa $ $Date: 2002-03-27 15:31:08 $
* last change: $Author: ssa $ $Date: 2002-04-16 07:58:29 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -413,7 +413,8 @@ FloatingWindow* FloatingWindow::ImplFloatHitTest( Window* pReference, const Poin
do
{
Rectangle devRect( OutputToAbsoluteScreenPixel( ScreenToOutputPixel(pWin->GetPosPixel()) ), pWin->GetSizePixel() ) ;
//Rectangle devRect( OutputToAbsoluteScreenPixel( ScreenToOutputPixel(pWin->GetPosPixel()) ), pWin->GetSizePixel() ) ;
Rectangle devRect( pWin->GetWindowExtentsRelative( NULL ) );
if ( devRect.IsInside( aAbsolute ) )
{
rHitTest = IMPL_FLOATWIN_HITTEST_WINDOW;

View File

@@ -2,9 +2,9 @@
*
* $RCSfile: window.cxx,v $
*
* $Revision: 1.72 $
* $Revision: 1.73 $
*
* last change: $Author: ssa $ $Date: 2002-04-15 12:46:26 $
* last change: $Author: ssa $ $Date: 2002-04-16 07:58:29 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -6238,7 +6238,18 @@ void Window::SetPosSizePixel( long nX, long nY,
Point Window::GetPosPixel() const
{
return maPos;
if ( mbFrame )
{
SalFrameGeometry g = mpFrame->GetGeometry();
Point aPos( OutputToScreenPixel( Point(0,0) ) );
aPos.X() += g.nX;
aPos.Y() += g.nY;
if( mpParent )
aPos = mpParent->AbsoluteScreenToOutputPixel( aPos );
return aPos;
}
else
return maPos;
}
// -----------------------------------------------------------------------