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 <ofourdan@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Karol Herbst <karolherbst@gmail.com>
This commit is contained in:
Olivier Fourdan 2020-06-03 10:17:13 +02:00
parent 0006aecba0
commit 1e5d3eef56

View file

@ -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);
}