From ec13a6a61f43672adea025a04321da462d81995f Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 30 Jul 2024 12:26:40 +0200 Subject: [PATCH] Xnest: simplify disabling unsupported extension Instead of strange #undef hacks in various places, just go the straight route and set the corresponding no*Extension flags on server startup. Signed-off-by: Enrico Weigelt, metux IT consult Part-of: --- hw/xnest/Args.c | 14 ++++++++++++++ hw/xnest/xnest-config.h | 2 -- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/hw/xnest/Args.c b/hw/xnest/Args.c index cb0cded86..a57da839b 100644 --- a/hw/xnest/Args.c +++ b/hw/xnest/Args.c @@ -25,6 +25,7 @@ is" without express or implied warranty. #include "misc.h" #include "scrnintstr.h" #include "servermd.h" +#include "extinit.h" #include "Xnest.h" @@ -54,6 +55,19 @@ Window xnestParentWindow = 0; int ddxProcessArgument(int argc, char *argv[], int i) { + /* disable some extensions we currently don't support yet */ +#ifdef MITSHM + noMITShmExtension = TRUE; +#endif + +#ifdef COMPOSITE + noCompositeExtension = TRUE; +#endif + +#ifdef DPMSExtension + noDPMSExtension = TRUE; +#endif + if (!strcmp(argv[i], "-display")) { if (++i < argc) { xnestDisplayName = argv[i]; diff --git a/hw/xnest/xnest-config.h b/hw/xnest/xnest-config.h index ef48c580f..fb2e3beee 100644 --- a/hw/xnest/xnest-config.h +++ b/hw/xnest/xnest-config.h @@ -31,6 +31,4 @@ #include #include -#undef MITSHM - #endif /* XNEST_CONFIG_H */