diff options
author | Adam Jackson <ajax@redhat.com> | 2009-08-20 16:56:04 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2009-08-20 17:11:57 -0400 |
commit | 9d8fc33cae2fee7777edd20658dbf6a3ffb3d557 (patch) | |
tree | 558b030a1b3c8d102ccb4e61639bf1804c906b5f /composite/compext.c | |
parent | ae68708ebe24c4cdf8c5265e206f6913d9298f37 (diff) |
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.
Diffstat (limited to 'composite/compext.c')
-rw-r--r-- | composite/compext.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/composite/compext.c b/composite/compext.c index 608f29a8a..56b4f2784 100644 --- a/composite/compext.c +++ b/composite/compext.c @@ -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); |