From 533090acd15c5d1ced0eb67dd7c1fc5e78ee1f23 Mon Sep 17 00:00:00 2001 From: Vincent Wei Date: Sun, 19 Jan 2020 16:20:25 +0800 Subject: [PATCH] call mg_InitCompositor and mg_TerminateCompositor --- src/kernel/init-lite.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/kernel/init-lite.c b/src/kernel/init-lite.c index 2a038bd7..0896d123 100644 --- a/src/kernel/init-lite.c +++ b/src/kernel/init-lite.c @@ -527,25 +527,21 @@ int InitGUI (int argc, const char* agr[]) step++; #ifdef _MGRM_STANDALONE - /* Init IAL engine.. */ if (!mg_InitLWEvent ()) { err_message (step, "Can not initialize low level event!"); return step; } step++; - atexit (mg_TerminateLWEvent); SetDskIdleHandler (salone_IdleHandler4StandAlone); - if (!salone_StandAloneStartup ()) { _ERR_PRINTF ("KERNEL>InitGUI: Can not start MiniGUI-StandAlone version.\n"); return step; } -#else - +#else /* not defined _MGRM_STANDALONE */ if (_is_server) { /* Init IAL engine.. */ if (!mg_InitLWEvent ()) { @@ -561,11 +557,22 @@ int InitGUI (int argc, const char* agr[]) else { SetDskIdleHandler (client_IdleHandler4Client); } -#endif +#endif /* not defined _MGRM_STANDALONE */ SetKeyboardLayout ("default"); mg_TerminateMgEtc (); + +#ifdef _MGSCHEMA_COMPOSITING + if (_is_server) { + if (!mg_InitCompositor ()) { + err_message (step, "Can not initialize compositor!"); + return step; + } + atexit (mg_TerminateCompositor); + } +#endif + return 0; }