BScreens methods didn't work for a number of reasons: fixed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12517 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -738,34 +738,6 @@ void AppServer::DispatchMessage(int32 code, BPortLink &msg)
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case AS_SCREEN_GET_MODE:
|
|
||||||
{
|
|
||||||
port_id replyport = -1;
|
|
||||||
if (msg.Read<port_id>(&replyport) < B_OK)
|
|
||||||
break;
|
|
||||||
|
|
||||||
screen_id id;
|
|
||||||
msg.Read<screen_id>(&id);
|
|
||||||
uint32 workspace;
|
|
||||||
msg.Read<uint32>(&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<display_mode>(mode);
|
|
||||||
replylink.Attach<status_t>(B_OK);
|
|
||||||
replylink.Flush();
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case B_QUIT_REQUESTED:
|
case B_QUIT_REQUESTED:
|
||||||
{
|
{
|
||||||
#if TEST_MODE
|
#if TEST_MODE
|
||||||
|
|||||||
@@ -1823,6 +1823,37 @@ void ServerApp::DispatchMessage(int32 code, LinkMsgReader &msg)
|
|||||||
|
|
||||||
break;
|
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<screen_id>(&id);
|
||||||
|
uint32 workspace;
|
||||||
|
msg.Read<uint32>(&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<int32>(&replyport);
|
||||||
|
|
||||||
|
replylink.SetSendPort(replyport);
|
||||||
|
replylink.StartMessage(SERVER_TRUE);
|
||||||
|
replylink.Attach<display_mode>(mode);
|
||||||
|
replylink.Attach<status_t>(B_OK);
|
||||||
|
replylink.Flush();
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
STRACE(("ServerApp %s received unhandled message code offset %s\n",fSignature.String(),
|
STRACE(("ServerApp %s received unhandled message code offset %s\n",fSignature.String(),
|
||||||
|
|||||||
Reference in New Issue
Block a user