diff --git a/src/servers/app/AppServer.cpp b/src/servers/app/AppServer.cpp index 3031e8be92..3fd54b734c 100644 --- a/src/servers/app/AppServer.cpp +++ b/src/servers/app/AppServer.cpp @@ -738,34 +738,6 @@ void AppServer::DispatchMessage(int32 code, BPortLink &msg) break; } - case AS_SCREEN_GET_MODE: - { - port_id replyport = -1; - if (msg.Read(&replyport) < B_OK) - break; - - screen_id id; - msg.Read(&id); - uint32 workspace; - msg.Read(&workspace); - - // TODO: the display_mode can be different between - // the various screens. - // We have the screen_id and the workspace number, with these - // we need to find the corresponding "driver", and call getmode on it - display_mode mode; - desktop->GetDisplayDriver()->GetMode(&mode); - // actually this isn't still enough as different workspaces can - // have different display_modes - - BPortLink replylink(replyport); - replylink.StartMessage(AS_SCREEN_GET_MODE); - replylink.Attach(mode); - replylink.Attach(B_OK); - replylink.Flush(); - - break; - } case B_QUIT_REQUESTED: { #if TEST_MODE diff --git a/src/servers/app/ServerApp.cpp b/src/servers/app/ServerApp.cpp index 99250a2dd9..c4b81f1fa1 100644 --- a/src/servers/app/ServerApp.cpp +++ b/src/servers/app/ServerApp.cpp @@ -1823,6 +1823,37 @@ void ServerApp::DispatchMessage(int32 code, LinkMsgReader &msg) break; } + case AS_SCREEN_GET_MODE: + { + // Attached data + // 1) int32 port to reply to + // 2) screen_id + // 3) workspace index + screen_id id; + msg.Read(&id); + uint32 workspace; + msg.Read(&workspace); + + // TODO: the display_mode can be different between + // the various screens. + // We have the screen_id and the workspace number, with these + // we need to find the corresponding "driver", and call getmode on it + display_mode mode; + desktop->GetDisplayDriver()->GetMode(&mode); + // actually this isn't still enough as different workspaces can + // have different display_modes + + int32 replyport; + msg.Read(&replyport); + + replylink.SetSendPort(replyport); + replylink.StartMessage(SERVER_TRUE); + replylink.Attach(mode); + replylink.Attach(B_OK); + replylink.Flush(); + + break; + } default: { STRACE(("ServerApp %s received unhandled message code offset %s\n",fSignature.String(),