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:
@@ -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();
|
||||||
|
|
||||||
@@ -753,7 +744,7 @@ ServerApp::DispatchMessage(int32 code, LinkMsgReader &msg)
|
|||||||
// 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.
|
||||||
desktop->ActiveRootLayer()->GetDisplayDriver()->ShowCursor();
|
desktop->ActiveRootLayer()->GetDisplayDriver()->ShowCursor();
|
||||||
fCursorHidden=false;
|
fCursorHidden = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case AS_HIDE_CURSOR:
|
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
|
// 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.
|
||||||
desktop->ActiveRootLayer()->GetDisplayDriver()->HideCursor();
|
desktop->ActiveRootLayer()->GetDisplayDriver()->HideCursor();
|
||||||
fCursorHidden=true;
|
fCursorHidden = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case AS_OBSCURE_CURSOR:
|
case AS_OBSCURE_CURSOR:
|
||||||
@@ -803,7 +794,7 @@ ServerApp::DispatchMessage(int32 code, LinkMsgReader &msg)
|
|||||||
if(fAppCursor)
|
if(fAppCursor)
|
||||||
desktop->ActiveRootLayer()->GetCursorManager().DeleteCursor(fAppCursor->ID());
|
desktop->ActiveRootLayer()->GetCursorManager().DeleteCursor(fAppCursor->ID());
|
||||||
|
|
||||||
fAppCursor=new ServerCursor(cdata);
|
fAppCursor = new ServerCursor(cdata);
|
||||||
fAppCursor->SetOwningTeam(fClientTeamID);
|
fAppCursor->SetOwningTeam(fClientTeamID);
|
||||||
fAppCursor->SetAppSignature(fSignature.String());
|
fAppCursor->SetAppSignature(fSignature.String());
|
||||||
desktop->ActiveRootLayer()->GetCursorManager().AddCursor(fAppCursor);
|
desktop->ActiveRootLayer()->GetCursorManager().AddCursor(fAppCursor);
|
||||||
@@ -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;
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user