::MoveBy() fixed.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8054 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
54d800ec02
commit
5929c56ed0
@ -1727,10 +1727,12 @@ BView* BWindow::LastMouseMovedView() const{
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
void BWindow::MoveBy(float dx, float dy){
|
void BWindow::MoveBy(float dx, float dy){
|
||||||
|
Lock();
|
||||||
BPoint offset( dx, dy );
|
session->WriteInt32( AS_WINDOW_MOVE );
|
||||||
|
session->WriteFloat( dx );
|
||||||
MoveTo( fFrame.LeftTop() + offset );
|
session->WriteFloat( dy );
|
||||||
|
session->Sync();
|
||||||
|
Unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
@ -1742,13 +1744,7 @@ void BWindow::MoveTo( BPoint point ){
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
void BWindow::MoveTo(float x, float y){
|
void BWindow::MoveTo(float x, float y){
|
||||||
|
MoveBy(x - fFrame.left, y - fFrame.top);
|
||||||
Lock();
|
|
||||||
session->WriteInt32( AS_WINDOW_MOVE );
|
|
||||||
session->WriteFloat( x );
|
|
||||||
session->WriteFloat( y );
|
|
||||||
session->Sync();
|
|
||||||
Unlock();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user