mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 08:04:30 +00:00
dix: initialize all screens before proceeding to gc's, root windows etc
Current code walks along all screens and initializes screen resources, then gc's, stipples, root windows for each of them, hence after the first screen registering new private keys is no more possible. This crashes modesetting driver if it is not initialized before others. This patch makes screen resources for all screen initialize first, hence all necessary private keys (including of the type PRIVATE_WINDOW) are initialized before root windows are created. Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
This commit is contained in:
committed by
Enrico Weigelt
parent
3f821b291e
commit
f4115e69eb
@@ -209,11 +209,18 @@ dix_main(int argc, char *argv[], char *envp[])
|
||||
FatalError("failed to create screen resources");
|
||||
});
|
||||
|
||||
/* Let all screens register the necessary privates */
|
||||
|
||||
DIX_FOR_EACH_SCREEN({
|
||||
if (!PixmapScreenInit(walkScreen))
|
||||
FatalError("failed to create screen pixmap properties");
|
||||
if (!dixScreenRaiseCreateResources(walkScreen))
|
||||
FatalError("failed to create screen resources");
|
||||
});
|
||||
|
||||
/* Then use these privates to initialize root windows etc */
|
||||
|
||||
DIX_FOR_EACH_SCREEN({
|
||||
if (!CreateGCperDepth(walkScreen))
|
||||
FatalError("failed to create scratch GCs");
|
||||
if (!CreateDefaultStipple(walkScreen))
|
||||
|
||||
Reference in New Issue
Block a user