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 ec83d674167e7045d5317b179c9998e3172a26dc)
This commit is contained in:
parent
6245e9dd47
commit
b0c8558b9d
|
@ -55,6 +55,8 @@ RRCrtcCreate (void *devPrivate)
|
|||
{
|
||||
RRCrtcPtr crtc;
|
||||
|
||||
if (!RRInit())
|
||||
return NULL;
|
||||
crtc = xalloc (sizeof (RRCrtcRec));
|
||||
if (!crtc)
|
||||
return NULL;
|
||||
|
|
|
@ -67,6 +67,9 @@ RRModeGet (xRRModeInfo *modeInfo,
|
|||
}
|
||||
}
|
||||
|
||||
if (!RRInit ())
|
||||
return NULL;
|
||||
|
||||
mode = xalloc (sizeof (RRModeRec) + modeInfo->nameLength + 1);
|
||||
if (!mode)
|
||||
return NULL;
|
||||
|
|
|
@ -51,6 +51,8 @@ RROutputCreate (const char *name,
|
|||
{
|
||||
RROutputPtr output;
|
||||
|
||||
if (!RRInit())
|
||||
return NULL;
|
||||
output = xalloc (sizeof (RROutputRec) + nameLength + 1);
|
||||
if (!output)
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in New Issue