randr: Add [GS]etOutputPrimary

This commit is contained in:
Adam Jackson
2008-12-09 10:51:37 -05:00
parent d281866b74
commit 9d58d2a319
4 changed files with 145 additions and 1 deletions

View File

@@ -436,6 +436,31 @@ SProcRRSetPanning (ClientPtr client)
return (*ProcRandrVector[stuff->randrReqType]) (client);
}
static int
SProcRRSetOutputPrimary (ClientPtr client)
{
int n;
REQUEST(xRRSetOutputPrimaryReq);
REQUEST_SIZE_MATCH(xRRSetOutputPrimaryReq);
swaps(&stuff->length, n);
swapl(&stuff->window, n);
swapl(&stuff->output, n);
return ProcRandrVector[stuff->randrReqType](client);
}
static int
SProcRRGetOutputPrimary (ClientPtr client)
{
int n;
REQUEST(xRRSetOutputPrimaryReq);
REQUEST_SIZE_MATCH(xRRGetOutputPrimaryReq);
swaps(&stuff->length, n);
swapl(&stuff->window, n);
return ProcRandrVector[stuff->randrReqType](client);
}
int (*SProcRandrVector[RRNumberRequests])(ClientPtr) = {
SProcRRQueryVersion, /* 0 */
/* we skip 1 to make old clients fail pretty immediately */
@@ -472,5 +497,7 @@ int (*SProcRandrVector[RRNumberRequests])(ClientPtr) = {
SProcRRGetCrtcTransform, /* 27 */
SProcRRGetPanning, /* 28 */
SProcRRSetPanning, /* 29 */
SProcRRSetOutputPrimary, /* 30 */
SProcRRGetOutputPrimary, /* 31 */
};