Ensure RandR resource types are registered before resources are created.

Now that resources can be created during server initialization, make sure
the crtc, output and mode resource types are created before attempting to
create associated resources.
(cherry picked from commit ec83d67416)
This commit is contained in:
Keith Packard 2006-11-26 19:31:48 -08:00 committed by Eric Anholt
parent 6245e9dd47
commit b0c8558b9d
3 changed files with 7 additions and 0 deletions

View File

@ -55,6 +55,8 @@ RRCrtcCreate (void *devPrivate)
{
RRCrtcPtr crtc;
if (!RRInit())
return NULL;
crtc = xalloc (sizeof (RRCrtcRec));
if (!crtc)
return NULL;

View File

@ -67,6 +67,9 @@ RRModeGet (xRRModeInfo *modeInfo,
}
}
if (!RRInit ())
return NULL;
mode = xalloc (sizeof (RRModeRec) + modeInfo->nameLength + 1);
if (!mode)
return NULL;

View File

@ -51,6 +51,8 @@ RROutputCreate (const char *name,
{
RROutputPtr output;
if (!RRInit())
return NULL;
output = xalloc (sizeof (RROutputRec) + nameLength + 1);
if (!output)
return NULL;