Removed some bugs to allow the server to run. We can now display (but not play with) a real BWindow!
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3634 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1788,7 +1788,10 @@ void BWindow::ResizeTo(float width, float height){
|
|||||||
|
|
||||||
void BWindow::Show(){
|
void BWindow::Show(){
|
||||||
if ( Thread() == B_ERROR )
|
if ( Thread() == B_ERROR )
|
||||||
|
{
|
||||||
|
Lock();
|
||||||
Run();
|
Run();
|
||||||
|
}
|
||||||
|
|
||||||
fShowLevel--;
|
fShowLevel--;
|
||||||
|
|
||||||
@@ -1917,6 +1920,7 @@ void BWindow::InitData( BRect frame,
|
|||||||
uint32 flags,
|
uint32 flags,
|
||||||
uint32 workspace){
|
uint32 workspace){
|
||||||
|
|
||||||
|
fTitle=NULL;
|
||||||
if ( be_app == NULL ){
|
if ( be_app == NULL ){
|
||||||
//debugger("You need a valid BApplication object before interacting with the app_server");
|
//debugger("You need a valid BApplication object before interacting with the app_server");
|
||||||
return;
|
return;
|
||||||
@@ -1997,7 +2001,7 @@ void BWindow::InitData( BRect frame,
|
|||||||
|
|
||||||
|
|
||||||
// let app_server to know that a window has been created.
|
// let app_server to know that a window has been created.
|
||||||
serverLink = new PortLink(be_app->fServerTo);
|
serverLink = new PortLink(be_app->fServerFrom);
|
||||||
status_t replyStat;
|
status_t replyStat;
|
||||||
PortLink::ReplyData replyData;
|
PortLink::ReplyData replyData;
|
||||||
|
|
||||||
@@ -2018,11 +2022,13 @@ void BWindow::InitData( BRect frame,
|
|||||||
|
|
||||||
// Send and wait for ServerWindow port. Necessary here so we can respond to
|
// Send and wait for ServerWindow port. Necessary here so we can respond to
|
||||||
// messages as soon as Show() is called.
|
// messages as soon as Show() is called.
|
||||||
|
|
||||||
replyStat = serverLink->FlushWithReply( &replyData );
|
replyStat = serverLink->FlushWithReply( &replyData );
|
||||||
if ( replyStat != B_OK ){
|
if ( replyStat != B_OK ){
|
||||||
//debugger("First reply from app_server was not received.");
|
//debugger("First reply from app_server was not received.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// unlock, so other threads can do their job.
|
// unlock, so other threads can do their job.
|
||||||
be_app->Unlock();
|
be_app->Unlock();
|
||||||
|
|
||||||
@@ -2034,7 +2040,7 @@ void BWindow::InitData( BRect frame,
|
|||||||
// They need to be sent separately because of the speed reasons.
|
// They need to be sent separately because of the speed reasons.
|
||||||
srvGfxLink = new PortLink( send_port );
|
srvGfxLink = new PortLink( send_port );
|
||||||
|
|
||||||
delete replyData.buffer;
|
// delete replyData.buffer;
|
||||||
|
|
||||||
// Create and attach the top view
|
// Create and attach the top view
|
||||||
top_view = buildTopView();
|
top_view = buildTopView();
|
||||||
|
|||||||
Reference in New Issue
Block a user