Moved the port creation for app_server - input_server communication out of the DisplayDrivers and into the AppServer constructor. This may later needs to be moved into RootLayer if we want multiple user support.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12426 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -91,8 +91,17 @@ AppServer::AppServer(void) : BApplication (SERVER_SIGNATURE)
|
|||||||
AppServer::AppServer(void)
|
AppServer::AppServer(void)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
fMessagePort= create_port(200,SERVER_PORT_NAME);
|
fMessagePort= create_port(200, SERVER_PORT_NAME);
|
||||||
|
if (fMessagePort == B_NO_MORE_PORTS)
|
||||||
|
debugger("app_server could not create message port");
|
||||||
|
|
||||||
|
// Create the input port. The input_server will send it's messages here.
|
||||||
|
// TODO: If we want multiple user support we would need an individual
|
||||||
|
// port for each user and do the following for each RootLayer.
|
||||||
|
fServerInputPort = create_port(200, SERVER_INPUT_PORT);
|
||||||
|
if (fServerInputPort == B_NO_MORE_PORTS)
|
||||||
|
debugger("app_server could not create input port");
|
||||||
|
|
||||||
fAppList= new BList(0);
|
fAppList= new BList(0);
|
||||||
fQuittingServer= false;
|
fQuittingServer= false;
|
||||||
make_decorator= NULL;
|
make_decorator= NULL;
|
||||||
@@ -184,6 +193,20 @@ AppServer::AppServer(void)
|
|||||||
resume_thread(fPicassoThreadID);
|
resume_thread(fPicassoThreadID);
|
||||||
|
|
||||||
fDecoratorName="Default";
|
fDecoratorName="Default";
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
// TODO: We are supposed to start the input_server, but it's a BApplication
|
||||||
|
// that depends on the registrar running, which is started after app_server
|
||||||
|
int32 arg_c = 1;
|
||||||
|
char **arg_v = (char **)malloc(sizeof(char *) * (arg_c + 1));
|
||||||
|
arg_v[0] = strdup("/system/servers/input_server");
|
||||||
|
arg_v[1] = NULL;
|
||||||
|
thread_id isThread = load_image(arg_c, (const char**)arg_v, (const char **)environ);
|
||||||
|
free(arg_v[0]);
|
||||||
|
|
||||||
|
resume_thread(isThread);
|
||||||
|
setpgid(isThread, 0);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ private:
|
|||||||
create_decorator *make_decorator;
|
create_decorator *make_decorator;
|
||||||
|
|
||||||
port_id fMessagePort;
|
port_id fMessagePort;
|
||||||
|
port_id fServerInputPort;
|
||||||
|
|
||||||
image_id fDecoratorID;
|
image_id fDecoratorID;
|
||||||
|
|
||||||
|
|||||||
@@ -69,12 +69,6 @@ AccelerantDriver::AccelerantDriver()
|
|||||||
card_fd = -1;
|
card_fd = -1;
|
||||||
accelerant_image = -1;
|
accelerant_image = -1;
|
||||||
mode_list = NULL;
|
mode_list = NULL;
|
||||||
|
|
||||||
// we need this under Haiku too, as it is where the input_server
|
|
||||||
// sends it's data to.
|
|
||||||
port_id serverInputPort = create_port(200, SERVER_INPUT_PORT);
|
|
||||||
if (serverInputPort == B_NO_MORE_PORTS)
|
|
||||||
debugger("AccelerantDriver: out of ports\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -89,13 +89,6 @@ AccelerantHWInterface::AccelerantHWInterface()
|
|||||||
fDisplayMode.virtual_width = 640;
|
fDisplayMode.virtual_width = 640;
|
||||||
fDisplayMode.virtual_height = 480;
|
fDisplayMode.virtual_height = 480;
|
||||||
fDisplayMode.space = B_RGB32;
|
fDisplayMode.space = B_RGB32;
|
||||||
|
|
||||||
// TODO: Move this to a more general place
|
|
||||||
// we need this under Haiku too, as it is where the input_server
|
|
||||||
// sends it's data to.
|
|
||||||
port_id serverInputPort = create_port(200, SERVER_INPUT_PORT);
|
|
||||||
if (serverInputPort == B_NO_MORE_PORTS)
|
|
||||||
debugger("AccelerantDriver: out of ports\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// destructor
|
// destructor
|
||||||
|
|||||||
@@ -123,15 +123,6 @@ DirectDriver::DirectDriver()
|
|||||||
// We'll save this so that if we change the bit depth of the screen, we
|
// We'll save this so that if we change the bit depth of the screen, we
|
||||||
// can change it back when the driver is shut down.
|
// can change it back when the driver is shut down.
|
||||||
fSavedScreenMode=fCurrentScreenMode;
|
fSavedScreenMode=fCurrentScreenMode;
|
||||||
|
|
||||||
#ifdef ENABLE_INPUT_SERVER_EMULATION
|
|
||||||
port_id serverInputPort = create_port(200, SERVER_INPUT_PORT);
|
|
||||||
if (serverInputPort == B_NO_MORE_PORTS)
|
|
||||||
{
|
|
||||||
debugger("DirectDriver: out of ports\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DirectDriver::~DirectDriver()
|
DirectDriver::~DirectDriver()
|
||||||
|
|||||||
@@ -82,15 +82,10 @@ VDView::VDView(BRect bounds)
|
|||||||
SetViewColor(B_TRANSPARENT_32_BIT);
|
SetViewColor(B_TRANSPARENT_32_BIT);
|
||||||
viewbmp=new BBitmap(bounds,B_RGBA32,true);
|
viewbmp=new BBitmap(bounds,B_RGBA32,true);
|
||||||
|
|
||||||
// This link for sending mouse messages to the OBAppServer.
|
// This link for sending mouse messages to the Haiku app_server.
|
||||||
// This is only to take the place of the Input Server.
|
// This is only to take the place of the Input Server.
|
||||||
port_id serverInputPort = create_port(200, SERVER_INPUT_PORT);
|
port_id input_port = find_port(SERVER_INPUT_PORT);
|
||||||
if (serverInputPort == B_NO_MORE_PORTS)
|
serverlink = new BPortLink(input_port);
|
||||||
{
|
|
||||||
debugger("ViewDriver: out of ports\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
serverlink = new BPortLink(serverInputPort);
|
|
||||||
|
|
||||||
// Create a cursor which isn't just a box
|
// Create a cursor which isn't just a box
|
||||||
cursor=new BBitmap(BRect(0,0,20,20),B_RGBA32,true);
|
cursor=new BBitmap(BRect(0,0,20,20),B_RGBA32,true);
|
||||||
|
|||||||
@@ -146,12 +146,8 @@ CardView::CardView(BRect bounds)
|
|||||||
|
|
||||||
// This link for sending mouse messages to the Haiku app_server.
|
// This link for sending mouse messages to the Haiku app_server.
|
||||||
// This is only to take the place of the input_server.
|
// This is only to take the place of the input_server.
|
||||||
port_id serverInputPort = create_port(200, SERVER_INPUT_PORT);
|
port_id input_port = find_port(SERVER_INPUT_PORT);
|
||||||
if (serverInputPort == B_NO_MORE_PORTS) {
|
fServerLink = new BPortLink(input_port);
|
||||||
debugger("ViewHWInterface: out of ports\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
fServerLink = new BPortLink(serverInputPort);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CardView::~CardView()
|
CardView::~CardView()
|
||||||
|
|||||||
Reference in New Issue
Block a user