From 6ef98483f5be0420458c93e50284a8a545cbc604 Mon Sep 17 00:00:00 2001 From: DarkWyrm Date: Tue, 24 Jun 2003 01:01:20 +0000 Subject: [PATCH] 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 --- src/kits/interface/Window.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/kits/interface/Window.cpp b/src/kits/interface/Window.cpp index ef4574bb0b..bdadd8fc34 100644 --- a/src/kits/interface/Window.cpp +++ b/src/kits/interface/Window.cpp @@ -1788,7 +1788,10 @@ void BWindow::ResizeTo(float width, float height){ void BWindow::Show(){ if ( Thread() == B_ERROR ) + { + Lock(); Run(); + } fShowLevel--; @@ -1917,6 +1920,7 @@ void BWindow::InitData( BRect frame, uint32 flags, uint32 workspace){ + fTitle=NULL; if ( be_app == NULL ){ //debugger("You need a valid BApplication object before interacting with the app_server"); return; @@ -1997,7 +2001,7 @@ void BWindow::InitData( BRect frame, // 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; 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 // messages as soon as Show() is called. + replyStat = serverLink->FlushWithReply( &replyData ); if ( replyStat != B_OK ){ //debugger("First reply from app_server was not received."); return; } + // unlock, so other threads can do their job. be_app->Unlock(); @@ -2034,7 +2040,7 @@ void BWindow::InitData( BRect frame, // They need to be sent separately because of the speed reasons. srvGfxLink = new PortLink( send_port ); - delete replyData.buffer; +// delete replyData.buffer; // Create and attach the top view top_view = buildTopView();