From 1e5d3eef567a5d6ede38eb2c8bb5be00cd19d8d6 Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Wed, 3 Jun 2020 10:17:13 +0200 Subject: [PATCH] xwayland: Disable the XTEST extension by default Most features from the XTEST extension cannot work on Wayland, which can be misleading for applications which would (optionally) rely on that extension to implement some features. Disable the XTEST extension by default to make it clear that XTEST is not supposed to work on Xwayland, so that X11 clients are not tempted to use it. Using the standard command line option "+extension XTEST" can re-enable it at runtime, if really needed. Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer Acked-by: Karol Herbst --- hw/xwayland/xwayland.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c index 380c9c849..05735dc2b 100644 --- a/hw/xwayland/xwayland.c +++ b/hw/xwayland/xwayland.c @@ -271,3 +271,19 @@ InitOutput(ScreenInfo * screen_info, int argc, char **argv) listen_on_fds(); } } + +int +main(int argc, char *argv[], char *envp[]) +{ +#ifdef XTEST + /* Most features from the XTEST extension cannot work on Wayland, + * disable the XTEST extension so apps aren't tempted to use it. + * + * Using the standard command line option "+extension XTEST" + * can re-enable it at runtime, if really needed. + */ + noTestExtensions = TRUE; +#endif + + return dix_main(argc, argv, envp); +}