randr: Add GetScreenResourcesCurrent

This commit is contained in:
Adam Jackson 2008-11-24 16:20:51 -05:00
parent 554592cd70
commit b719ea30ce
3 changed files with 4 additions and 1 deletions

View file

@ -211,5 +211,6 @@ int (*ProcRandrVector[RRNumberRequests])(ClientPtr) = {
ProcRRGetCrtcGammaSize, /* 22 */
ProcRRGetCrtcGamma, /* 23 */
ProcRRSetCrtcGamma, /* 24 */
ProcRRGetScreenResources, /* 25 */
};

View file

@ -314,6 +314,7 @@ ProcRRSetScreenSize (ClientPtr client)
return Success;
}
/* This handles GetScreenResourcesCurrent too */
int
ProcRRGetScreenResources (ClientPtr client)
{
@ -339,7 +340,7 @@ ProcRRGetScreenResources (ClientPtr client)
pScrPriv = rrGetScrPriv(pScreen);
rep.pad = 0;
if (pScrPriv)
if (pScrPriv && stuff->randrReqType != X_RRGetScreenResourcesCurrent)
if (!RRGetInfo (pScreen))
return BadAlloc;

View file

@ -394,5 +394,6 @@ int (*SProcRandrVector[RRNumberRequests])(ClientPtr) = {
SProcRRGetCrtcGammaSize, /* 22 */
SProcRRGetCrtcGamma, /* 23 */
SProcRRSetCrtcGamma, /* 24 */
SProcRRGetScreenResources, /* 25 */
};