composite: Move screen init before extension registration.
Otherwise, you'd still advertise the extension even if no screens actually supported it, and the first Composite protocol request would probably crash.
This commit is contained in:
parent
ae68708ebe
commit
9d8fc33cae
|
@ -569,9 +569,14 @@ CompositeExtensionInit (void)
|
|||
if (!dixRequestPrivate(CompositeClientPrivateKey,
|
||||
sizeof(CompositeClientRec)))
|
||||
return;
|
||||
|
||||
if (!AddCallback (&ClientStateCallback, CompositeClientCallback, 0))
|
||||
return;
|
||||
|
||||
for (s = 0; s < screenInfo.numScreens; s++)
|
||||
if (!compScreenInit (screenInfo.screens[s]))
|
||||
return;
|
||||
|
||||
extEntry = AddExtension (COMPOSITE_NAME, 0, 0,
|
||||
ProcCompositeDispatch, SProcCompositeDispatch,
|
||||
NULL, StandardMinorOpcode);
|
||||
|
@ -579,9 +584,6 @@ CompositeExtensionInit (void)
|
|||
return;
|
||||
CompositeReqCode = (CARD8) extEntry->base;
|
||||
|
||||
for (s = 0; s < screenInfo.numScreens; s++)
|
||||
if (!compScreenInit (screenInfo.screens[s]))
|
||||
return;
|
||||
miRegisterRedirectBorderClipProc (compSetRedirectBorderClip,
|
||||
compGetRedirectBorderClip);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user