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:
@@ -414,28 +414,28 @@ void ServerApp::_DispatchMessage(PortMessage *msg)
|
|||||||
int32 token;
|
int32 token;
|
||||||
port_id sendPort;
|
port_id sendPort;
|
||||||
port_id looperPort;
|
port_id looperPort;
|
||||||
|
port_id replyport;
|
||||||
char *title;
|
char *title;
|
||||||
|
|
||||||
msg->Read<BRect>( &frame );
|
msg->Read<BRect>(&frame);
|
||||||
msg->Read<int32>( (int32*)&look );
|
msg->Read<int32>((int32*)&look);
|
||||||
msg->Read<int32>( (int32*)&feel );
|
msg->Read<int32>((int32*)&feel);
|
||||||
msg->Read<int32>( (int32*)&flags );
|
msg->Read<int32>((int32*)&flags);
|
||||||
msg->Read<int32>( (int32*)&wkspaces );
|
msg->Read<int32>((int32*)&wkspaces);
|
||||||
msg->Read<int32>( &token );
|
msg->Read<int32>(&token);
|
||||||
msg->Read<port_id>( &sendPort );
|
msg->Read<port_id>(&sendPort);
|
||||||
msg->Read<port_id>( &looperPort );
|
msg->Read<port_id>(&looperPort);
|
||||||
msg->ReadString( &title );
|
msg->ReadString(&title);
|
||||||
|
msg->Read<port_id>(&replyport);
|
||||||
|
|
||||||
STRACE(("ServerApp %s: Got 'New Window' message, trying to do smething...\n",
|
STRACE(("ServerApp %s: Got 'New Window' message, trying to do smething...\n",
|
||||||
_signature.String()));
|
_signature.String()));
|
||||||
|
|
||||||
// ServerWindow constructor will reply with port_id of a newly created port
|
// ServerWindow constructor will reply with port_id of a newly created port
|
||||||
ServerWindow *newwin = new ServerWindow( frame, title,
|
ServerWindow *newwin = new ServerWindow(frame, title,
|
||||||
look, feel, flags, this, sendPort, looperPort, wkspaces, token);
|
look, feel, flags, this, sendPort, looperPort, replyport, wkspaces, token);
|
||||||
|
|
||||||
_winlist->AddItem( newwin );
|
|
||||||
//AddWindowToDesktop( newwin, workspace, ActiveScreen() );
|
|
||||||
|
|
||||||
|
_winlist->AddItem(newwin);
|
||||||
|
|
||||||
STRACE(("ServerApp %s: New Window %s (%.1f,%.1f,%.1f,%.1f)\n",
|
STRACE(("ServerApp %s: New Window %s (%.1f,%.1f,%.1f,%.1f)\n",
|
||||||
_signature.String(),title,frame.left,frame.top,frame.right,frame.bottom));
|
_signature.String(),title,frame.left,frame.top,frame.right,frame.bottom));
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -67,7 +67,7 @@ public:
|
|||||||
ServerWindow(BRect rect, const char *string,
|
ServerWindow(BRect rect, const char *string,
|
||||||
uint32 wlook, uint32 wfeel, uint32 wflags,
|
uint32 wlook, uint32 wfeel, uint32 wflags,
|
||||||
ServerApp *winapp, port_id winport,
|
ServerApp *winapp, port_id winport,
|
||||||
port_id looperPort, uint32 index,
|
port_id looperPort, port_id replyport, uint32 index,
|
||||||
int32 handlerID);
|
int32 handlerID);
|
||||||
~ServerWindow(void);
|
~ServerWindow(void);
|
||||||
|
|
||||||
@@ -97,7 +97,7 @@ public:
|
|||||||
void Unlock(void);
|
void Unlock(void);
|
||||||
bool IsLocked(void);
|
bool IsLocked(void);
|
||||||
|
|
||||||
void DispatchMessage( int32 code );
|
void DispatchMessage(PortMessage msg);
|
||||||
void DispatchGraphicsMessage(int32 msgsize, int8 *msgbuffer);
|
void DispatchGraphicsMessage(int32 msgsize, int8 *msgbuffer);
|
||||||
static int32 MonitorWin(void *data);
|
static int32 MonitorWin(void *data);
|
||||||
static void HandleMouseEvent(PortMessage *msg);
|
static void HandleMouseEvent(PortMessage *msg);
|
||||||
@@ -141,7 +141,6 @@ protected:
|
|||||||
uint32 _token;
|
uint32 _token;
|
||||||
int32 _handlertoken;
|
int32 _handlertoken;
|
||||||
|
|
||||||
BSession *ses;
|
|
||||||
port_id winLooperPort;
|
port_id winLooperPort;
|
||||||
Layer *top_layer;
|
Layer *top_layer;
|
||||||
Layer *cl; // short for currentLayer. We'll use it a lot, that's why it's short :-)
|
Layer *cl; // short for currentLayer. We'll use it a lot, that's why it's short :-)
|
||||||
|
|||||||
Reference in New Issue
Block a user