Implemented server side support for BScreen::SetMode(). Note that setting the mode works, but rootlayer crashes afterwards. I guess I'll need to lock something. Adi ? Stephan ?

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12523 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini 2005-05-01 06:26:49 +00:00
parent 314a102446
commit f812bf8b4c

View File

@ -1854,6 +1854,40 @@ void ServerApp::DispatchMessage(int32 code, LinkMsgReader &msg)
break;
}
case AS_SCREEN_SET_MODE:
{
// Attached data
// 1) int32 port to reply to
// 2) screen_id
// 3) workspace index
// 4) display_mode to set
// 5) 'makedefault' boolean
screen_id id;
msg.Read<screen_id>(&id);
uint32 workspace;
msg.Read<uint32>(&workspace);
display_mode mode;
msg.Read<display_mode>(&mode);
bool makedefault = false;
msg.Read<bool>(&makedefault);
// TODO: See above: workspaces support, etc.
// TODO: This should return something
desktop->GetDisplayDriver()->SetMode(mode);
int32 replyport;
msg.Read<int32>(&replyport);
replylink.SetSendPort(replyport);
replylink.StartMessage(SERVER_TRUE);
replylink.Attach<status_t>(B_OK);
replylink.Flush();
break;
}
default:
{
STRACE(("ServerApp %s received unhandled message code offset %s\n",fSignature.String(),