* Modified a little the protocol for AS_LAYER_CREATE_ROOT message. Replaced PortLink with BSession. Was
necessary! git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7078 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -2028,6 +2028,7 @@ void BWindow::InitData( BRect frame,
|
|||||||
link.FlushWithReply(&pmsg);
|
link.FlushWithReply(&pmsg);
|
||||||
|
|
||||||
pmsg.Read<port_id>(&send_port);
|
pmsg.Read<port_id>(&send_port);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
session->WriteInt32( AS_CREATE_WINDOW );
|
session->WriteInt32( AS_CREATE_WINDOW );
|
||||||
session->WriteRect( fFrame );
|
session->WriteRect( fFrame );
|
||||||
@@ -2274,31 +2275,22 @@ void BWindow::BuildTopView(){
|
|||||||
top_view = new BView( fFrame.OffsetToCopy(0,0), "top_view",
|
top_view = new BView( fFrame.OffsetToCopy(0,0), "top_view",
|
||||||
B_FOLLOW_ALL, B_WILL_DRAW);
|
B_FOLLOW_ALL, B_WILL_DRAW);
|
||||||
top_view->top_level_view = true;
|
top_view->top_level_view = true;
|
||||||
//top_view->fShowLevel = 1;
|
top_view->fShowLevel = 1;
|
||||||
|
|
||||||
// set top_view's owner, add it to window's eligible handler list
|
// set top_view's owner, add it to window's eligible handler list
|
||||||
// and also set its next handler to be this window.
|
// and also set its next handler to this window.
|
||||||
top_view->setOwner( this );
|
top_view->setOwner( this );
|
||||||
|
|
||||||
PortLink link(send_port);
|
|
||||||
link.SetOpCode(AS_LAYER_CREATE_ROOT);
|
|
||||||
link.Attach<int32>(_get_object_token_( top_view ));
|
|
||||||
link.Attach<BRect>(top_view->Frame());
|
|
||||||
link.Attach<int32>(top_view->ResizingMode());
|
|
||||||
link.Attach<int32>(top_view->Flags());
|
|
||||||
link.AttachString(top_view->Name());
|
|
||||||
link.Flush();
|
|
||||||
/*
|
|
||||||
// send top_view's information to app_server
|
// send top_view's information to app_server
|
||||||
session->WriteInt32( AS_LAYER_CREATE_ROOT );
|
session->WriteInt32( AS_LAYER_CREATE_ROOT );
|
||||||
session->WriteInt32( _get_object_token_( top_view ) );
|
session->WriteInt32( _get_object_token_( top_view ) );
|
||||||
session->WriteRect( top_view->Frame() );
|
session->WriteRect( fFrame );//top_view->Frame() );
|
||||||
session->WriteInt32( top_view->ResizingMode() );
|
session->WriteInt32( top_view->ResizingMode() );
|
||||||
session->WriteInt32( top_view->Flags() );
|
session->WriteInt32( top_view->Flags() );
|
||||||
session->WriteString( top_view->Name() );
|
session->WriteString( top_view->Name() );
|
||||||
// we DO NOT send our current state; the server knows the default values!
|
// we DO NOT send our current state; the server knows the default values!
|
||||||
session->Sync();
|
session->Sync();
|
||||||
*/
|
|
||||||
fLastViewToken = _get_object_token_( top_view );
|
fLastViewToken = _get_object_token_( top_view );
|
||||||
STRACE(("BuildTopView ended\n"));
|
STRACE(("BuildTopView ended\n"));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user