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.
This commit is contained in:
parent
0626eb8e5c
commit
ec83d67416
|
@ -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
Block a user