* Radically culled the list of BApplication friends and introduced a

BApplication::Private class for accessing relevant parts.
* Pulled the app server connection and IK initialization out of
  InitData() into a new method _InitGUIContext() and introduced a private
  constructor that allows to avoid this initialization. This will be used
  for servers that don't have GUI respectively want to init the app server
  connection later.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13312 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2005-06-28 12:55:16 +00:00
parent ecf3bc3eb4
commit c8e7f53e08
5 changed files with 93 additions and 46 deletions
+3 -1
View File
@@ -25,6 +25,7 @@
#include <MessageRunner.h>
#include <Roster.h>
#include <ApplicationPrivate.h>
#include <AppMisc.h>
#include <PortLink.h>
#include <ServerProtocol.h>
@@ -2058,7 +2059,8 @@ BWindow::InitData(BRect frame, const char* title, window_look look,
STRACE(("BWindow::InitData(): contacting app_server...\n"));
// let app_server to know that a window has been created.
fLink = new BPrivate::PortLink(be_app->fServerLink->SenderPort(), receivePort);
fLink = new BPrivate::PortLink(
BApplication::Private::ServerLink()->SenderPort(), receivePort);
// HERE we are in BApplication's thread, so for locking we use be_app variable
// we'll lock the be_app to be sure we're the only one writing at BApplication's server port