more cleanup, fixed a bug in AS_GET_ESCAPEMENTS_AS_FLOATS that caused a lockup. DarkWyrm - I'm looking at you. :-)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12640 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus
2005-05-12 10:31:48 +00:00
parent d4189794fe
commit b3d3da708d
2 changed files with 13 additions and 24 deletions
+12 -23
View File
@@ -86,7 +86,7 @@
MIME fSignature.
*/
ServerApp::ServerApp(port_id sendport, port_id rcvport, port_id clientLooperPort,
team_id clientTeamID, int32 handlerID, char *signature)
team_id clientTeamID, int32 handlerID, const char* signature)
:
fClientAppPort(sendport),
fMessagePort(rcvport),
@@ -94,31 +94,22 @@ ServerApp::ServerApp(port_id sendport, port_id rcvport, port_id clientLooperPort
fSignature(signature),
fMonitorThreadID(-1),
fClientTeamID(clientTeamID),
fMsgReader(NULL),
fMsgSender(NULL),
fSWindowList(NULL),
fBitmapList(NULL),
fPictureList(NULL),
fMsgReader(new LinkMsgReader(fMessagePort)),
fMsgSender(new LinkMsgSender(fClientAppPort)),
fSWindowList(new BList()),
fBitmapList(new BList()),
fPictureList(new BList()),
fAppCursor(NULL),
fLockSem(-1),
fLockSem(create_sem(1, "ServerApp sem")),
fCursorHidden(false),
fIsActive(false),
//fHandlerToken(handlerID),
fSharedMem(NULL),
fSharedMem(new AreaPool),
fQuitting(false)
{
if (fSignature == "")
fSignature = "application/x-vnd.NULL-application-signature";
fMsgReader = new LinkMsgReader(fMessagePort);
fMsgSender = new LinkMsgSender(fClientAppPort);
fSWindowList = new BList();
fBitmapList = new BList();
fPictureList = new BList();
fSharedMem = new AreaPool;
// although this isn't pretty, ATM we have only one RootLayer.
// there should be a way that this ServerApp be attached to a particular
// RootLayer to know which RootLayer's cursor to modify.
@@ -130,7 +121,7 @@ ServerApp::ServerApp(port_id sendport, port_id rcvport, port_id clientLooperPort
fAppCursor->SetOwningTeam(fClientTeamID);
}
fLockSem = create_sem(1, "ServerApp sem");
// fLockSem = create_sem(1, "ServerApp sem");
Run();
@@ -753,7 +744,7 @@ ServerApp::DispatchMessage(int32 code, LinkMsgReader &msg)
// there should be a way that this ServerApp be attached to a particular
// RootLayer to know which RootLayer's cursor to modify.
desktop->ActiveRootLayer()->GetDisplayDriver()->ShowCursor();
fCursorHidden=false;
fCursorHidden = false;
break;
}
case AS_HIDE_CURSOR:
@@ -763,7 +754,7 @@ ServerApp::DispatchMessage(int32 code, LinkMsgReader &msg)
// there should be a way that this ServerApp be attached to a particular
// RootLayer to know which RootLayer's cursor to modify.
desktop->ActiveRootLayer()->GetDisplayDriver()->HideCursor();
fCursorHidden=true;
fCursorHidden = true;
break;
}
case AS_OBSCURE_CURSOR:
@@ -803,7 +794,7 @@ ServerApp::DispatchMessage(int32 code, LinkMsgReader &msg)
if(fAppCursor)
desktop->ActiveRootLayer()->GetCursorManager().DeleteCursor(fAppCursor->ID());
fAppCursor=new ServerCursor(cdata);
fAppCursor = new ServerCursor(cdata);
fAppCursor->SetOwningTeam(fClientTeamID);
fAppCursor->SetAppSignature(fSignature.String());
desktop->ActiveRootLayer()->GetCursorManager().AddCursor(fAppCursor);
@@ -1836,10 +1827,8 @@ ServerApp::DispatchMessage(int32 code, LinkMsgReader &msg)
msg.Read<int32>(&numChars);
char charArray[numChars];
BPoint offsetArray[numChars];
for (int32 i = 0; i < numChars; i++) {
msg.Read<char>(&charArray[i]);
msg.Read<BPoint>(&offsetArray[i]);
}
port_id replyport;
+1 -1
View File
@@ -50,7 +50,7 @@ class ServerBitmap;
class ServerApp {
public:
ServerApp(port_id sendport, port_id rcvport, port_id clientLooperPort,
team_id clientTeamID, int32 handlerID, char *signature);
team_id clientTeamID, int32 handlerID, const char* signature);
virtual ~ServerApp(void);
bool Run(void);