From b3d3da708d775e46954ab634e02e25f8e841b17d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Thu, 12 May 2005 10:31:48 +0000 Subject: [PATCH] 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 --- src/servers/app/ServerApp.cpp | 35 ++++++++++++----------------------- src/servers/app/ServerApp.h | 2 +- 2 files changed, 13 insertions(+), 24 deletions(-) diff --git a/src/servers/app/ServerApp.cpp b/src/servers/app/ServerApp.cpp index fda0482bc2..086aeb857f 100644 --- a/src/servers/app/ServerApp.cpp +++ b/src/servers/app/ServerApp.cpp @@ -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(&numChars); char charArray[numChars]; - BPoint offsetArray[numChars]; for (int32 i = 0; i < numChars; i++) { msg.Read(&charArray[i]); - msg.Read(&offsetArray[i]); } port_id replyport; diff --git a/src/servers/app/ServerApp.h b/src/servers/app/ServerApp.h index 610042edc6..768cd73060 100644 --- a/src/servers/app/ServerApp.h +++ b/src/servers/app/ServerApp.h @@ -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);