Messaging fixes - removed inappropriate BSession use and converted to PortMessage and PortLink as necessary.

Life sucks when you can't sleep. :(


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5601 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
DarkWyrm 2003-12-07 05:40:51 +00:00
parent 60c2633d9f
commit ab21b1ec0c
3 changed files with 336 additions and 327 deletions

View File

@ -414,28 +414,28 @@ void ServerApp::_DispatchMessage(PortMessage *msg)
int32 token;
port_id sendPort;
port_id looperPort;
port_id replyport;
char *title;
msg->Read<BRect>( &frame );
msg->Read<int32>( (int32*)&look );
msg->Read<int32>( (int32*)&feel );
msg->Read<int32>( (int32*)&flags );
msg->Read<int32>( (int32*)&wkspaces );
msg->Read<int32>( &token );
msg->Read<port_id>( &sendPort );
msg->Read<port_id>( &looperPort );
msg->ReadString( &title );
msg->Read<BRect>(&frame);
msg->Read<int32>((int32*)&look);
msg->Read<int32>((int32*)&feel);
msg->Read<int32>((int32*)&flags);
msg->Read<int32>((int32*)&wkspaces);
msg->Read<int32>(&token);
msg->Read<port_id>(&sendPort);
msg->Read<port_id>(&looperPort);
msg->ReadString(&title);
msg->Read<port_id>(&replyport);
STRACE(("ServerApp %s: Got 'New Window' message, trying to do smething...\n",
_signature.String()));
// ServerWindow constructor will reply with port_id of a newly created port
ServerWindow *newwin = new ServerWindow( frame, title,
look, feel, flags, this, sendPort, looperPort, wkspaces, token);
_winlist->AddItem( newwin );
//AddWindowToDesktop( newwin, workspace, ActiveScreen() );
ServerWindow *newwin = new ServerWindow(frame, title,
look, feel, flags, this, sendPort, looperPort, replyport, wkspaces, token);
_winlist->AddItem(newwin);
STRACE(("ServerApp %s: New Window %s (%.1f,%.1f,%.1f,%.1f)\n",
_signature.String(),title,frame.left,frame.top,frame.right,frame.bottom));

File diff suppressed because it is too large Load Diff

View File

@ -67,7 +67,7 @@ public:
ServerWindow(BRect rect, const char *string,
uint32 wlook, uint32 wfeel, uint32 wflags,
ServerApp *winapp, port_id winport,
port_id looperPort, uint32 index,
port_id looperPort, port_id replyport, uint32 index,
int32 handlerID);
~ServerWindow(void);
@ -97,7 +97,7 @@ public:
void Unlock(void);
bool IsLocked(void);
void DispatchMessage( int32 code );
void DispatchMessage(PortMessage msg);
void DispatchGraphicsMessage(int32 msgsize, int8 *msgbuffer);
static int32 MonitorWin(void *data);
static void HandleMouseEvent(PortMessage *msg);
@ -141,7 +141,6 @@ protected:
uint32 _token;
int32 _handlertoken;
BSession *ses;
port_id winLooperPort;
Layer *top_layer;
Layer *cl; // short for currentLayer. We'll use it a lot, that's why it's short :-)