mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-20 09:20:02 +01:00
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
1 changed files with 5 additions and 3 deletions
|
|
@ -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…
Add table
Reference in a new issue