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
+9 -20
View File
@@ -86,7 +86,7 @@
MIME fSignature. MIME fSignature.
*/ */
ServerApp::ServerApp(port_id sendport, port_id rcvport, port_id clientLooperPort, 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), fClientAppPort(sendport),
fMessagePort(rcvport), fMessagePort(rcvport),
@@ -94,31 +94,22 @@ ServerApp::ServerApp(port_id sendport, port_id rcvport, port_id clientLooperPort
fSignature(signature), fSignature(signature),
fMonitorThreadID(-1), fMonitorThreadID(-1),
fClientTeamID(clientTeamID), fClientTeamID(clientTeamID),
fMsgReader(NULL), fMsgReader(new LinkMsgReader(fMessagePort)),
fMsgSender(NULL), fMsgSender(new LinkMsgSender(fClientAppPort)),
fSWindowList(NULL), fSWindowList(new BList()),
fBitmapList(NULL), fBitmapList(new BList()),
fPictureList(NULL), fPictureList(new BList()),
fAppCursor(NULL), fAppCursor(NULL),
fLockSem(-1), fLockSem(create_sem(1, "ServerApp sem")),
fCursorHidden(false), fCursorHidden(false),
fIsActive(false), fIsActive(false),
//fHandlerToken(handlerID), //fHandlerToken(handlerID),
fSharedMem(NULL), fSharedMem(new AreaPool),
fQuitting(false) fQuitting(false)
{ {
if (fSignature == "") if (fSignature == "")
fSignature = "application/x-vnd.NULL-application-signature"; 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. // although this isn't pretty, ATM we have only one RootLayer.
// there should be a way that this ServerApp be attached to a particular // there should be a way that this ServerApp be attached to a particular
// RootLayer to know which RootLayer's cursor to modify. // 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); fAppCursor->SetOwningTeam(fClientTeamID);
} }
fLockSem = create_sem(1, "ServerApp sem"); // fLockSem = create_sem(1, "ServerApp sem");
Run(); Run();
@@ -1836,10 +1827,8 @@ ServerApp::DispatchMessage(int32 code, LinkMsgReader &msg)
msg.Read<int32>(&numChars); msg.Read<int32>(&numChars);
char charArray[numChars]; char charArray[numChars];
BPoint offsetArray[numChars];
for (int32 i = 0; i < numChars; i++) { for (int32 i = 0; i < numChars; i++) {
msg.Read<char>(&charArray[i]); msg.Read<char>(&charArray[i]);
msg.Read<BPoint>(&offsetArray[i]);
} }
port_id replyport; port_id replyport;
+1 -1
View File
@@ -50,7 +50,7 @@ class ServerBitmap;
class ServerApp { class ServerApp {
public: public:
ServerApp(port_id sendport, port_id rcvport, port_id clientLooperPort, 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); virtual ~ServerApp(void);
bool Run(void); bool Run(void);