::MoveBy() fixed.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8054 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Adi Oanca 2004-06-18 18:10:07 +00:00
parent 54d800ec02
commit 5929c56ed0

View File

@ -1727,10 +1727,12 @@ BView* BWindow::LastMouseMovedView() const{
//------------------------------------------------------------------------------
void BWindow::MoveBy(float dx, float dy){
BPoint offset( dx, dy );
MoveTo( fFrame.LeftTop() + offset );
Lock();
session->WriteInt32( AS_WINDOW_MOVE );
session->WriteFloat( dx );
session->WriteFloat( dy );
session->Sync();
Unlock();
}
//------------------------------------------------------------------------------
@ -1742,13 +1744,7 @@ void BWindow::MoveTo( BPoint point ){
//------------------------------------------------------------------------------
void BWindow::MoveTo(float x, float y){
Lock();
session->WriteInt32( AS_WINDOW_MOVE );
session->WriteFloat( x );
session->WriteFloat( y );
session->Sync();
Unlock();
MoveBy(x - fFrame.left, y - fFrame.top);
}
//------------------------------------------------------------------------------