summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Fourdan <ofourdan@redhat.com>2017-03-02 11:03:15 +0100
committerAdam Jackson <ajax@redhat.com>2017-09-13 11:21:16 -0400
commit1089d5d518a315963a8cda6c7d47a0ce09de0979 (patch)
tree486cf9ff922c102fce9bd46b92dd3a1f0df33810
parent5abaa50b292798370a665ace5eec56fd830be226 (diff)
xwayland: add envvar XWAYLAND_NO_GLAMOR
Not all compositors allow for customizing the Xwayland command line, gnome-shell/mutter for example have the command line and path to Xwayland binary hardcoded, which makes it harder for users to disable glamor acceleration in Xwayland (glamor being used by default). Add an environment variable XWAYLAND_NO_GLAMOR to disable glamor support in Xwayland. Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
-rw-r--r--hw/xwayland/xwayland-glamor.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/hw/xwayland/xwayland-glamor.c b/hw/xwayland/xwayland-glamor.c
index 87622839e..260e4e0d8 100644
--- a/hw/xwayland/xwayland-glamor.c
+++ b/hw/xwayland/xwayland-glamor.c
@@ -581,6 +581,13 @@ Bool
xwl_glamor_init(struct xwl_screen *xwl_screen)
{
ScreenPtr screen = xwl_screen->screen;
+ const char *no_glamor_env;
+
+ no_glamor_env = getenv("XWAYLAND_NO_GLAMOR");
+ if (no_glamor_env && *no_glamor_env != '0') {
+ ErrorF("Disabling glamor and dri3 support, XWAYLAND_NO_GLAMOR is set\n");
+ return FALSE;
+ }
if (xwl_screen->egl_context == EGL_NO_CONTEXT) {
ErrorF("Disabling glamor and dri3, EGL setup failed\n");