diff --git a/src/servers/app/EventStream.cpp b/src/servers/app/EventStream.cpp index 6eb6352b9a..9643262319 100644 --- a/src/servers/app/EventStream.cpp +++ b/src/servers/app/EventStream.cpp @@ -13,6 +13,8 @@ #include #include +#include + #include #include #include @@ -53,6 +55,8 @@ InputServerStream::InputServerStream(BMessenger& messenger) fLatestMouseMoved(NULL) { BMessage message(IS_ACQUIRE_INPUT); + message.AddInt32("remote team", BPrivate::current_team()); + fCursorArea = create_area("shared cursor", (void **)&fCursorBuffer, B_ANY_ADDRESS, B_PAGE_SIZE, B_LAZY_LOCK, B_READ_AREA | B_WRITE_AREA); if (fCursorArea >= B_OK) diff --git a/src/servers/input/InputServer.cpp b/src/servers/input/InputServer.cpp index c81832a4ee..bb74f9b9c7 100644 --- a/src/servers/input/InputServer.cpp +++ b/src/servers/input/InputServer.cpp @@ -153,6 +153,7 @@ InputServer::InputServer() fInputMethodAware(false), fCursorSem(-1), fAppServerPort(-1), + fAppServerTeam(-1), fCursorArea(-1) { CALLED(); @@ -394,6 +395,9 @@ InputServer::_AcquireInput(BMessage& message, BMessage& reply) } } + if (message.FindInt32("remote team", &fAppServerTeam) != B_OK) + fAppServerTeam = -1; + fAppServerPort = create_port(200, "input server target"); if (fAppServerPort < B_OK) { _ReleaseInput(&message); @@ -1836,7 +1840,8 @@ InputServer::_DispatchEvent(BMessage* event) BMessenger reply; BMessage::Private messagePrivate(event); - return messagePrivate.SendMessage(fAppServerPort, -1, 0, 0, false, reply); + return messagePrivate.SendMessage(fAppServerPort, fAppServerTeam, 0, 0, + false, reply); } diff --git a/src/servers/input/InputServer.h b/src/servers/input/InputServer.h index cff913d767..2466d6b85f 100644 --- a/src/servers/input/InputServer.h +++ b/src/servers/input/InputServer.h @@ -243,6 +243,7 @@ class InputServer : public BApplication { sem_id fCursorSem; port_id fAppServerPort; + team_id fAppServerTeam; area_id fCursorArea; shared_cursor* fCursorBuffer; };