summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Fourdan <ofourdan@redhat.com>2023-04-06 16:13:17 +0200
committerOlivier Fourdan <ofourdan@redhat.com>2023-04-12 10:27:32 +0200
commitda0de3caf62023d2b507ed3d66a0b0daa7104c4a (patch)
tree0b6290111ad5d3bd5c6f58530149f6965d547568
parentc24910d0e138dc1dc58c0c0cdc10b49a1ed85975 (diff)
xwayland: Fix build without GBM
The present code in Xwayland cannot be used without GBM, so if GBM is not available (or too old), the build would fail. Make sure we do not use the present code without GBM support. Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
-rw-r--r--hw/xwayland/meson.build6
-rw-r--r--hw/xwayland/xwayland-screen.c5
2 files changed, 7 insertions, 4 deletions
diff --git a/hw/xwayland/meson.build b/hw/xwayland/meson.build
index e24f39a75..b76d205b2 100644
--- a/hw/xwayland/meson.build
+++ b/hw/xwayland/meson.build
@@ -97,7 +97,10 @@ if build_glamor
srcs += 'xwayland-glx.c'
endif
if gbm_dep.found()
- srcs += 'xwayland-glamor-gbm.c'
+ srcs += [
+ 'xwayland-glamor-gbm.c',
+ 'xwayland-present.c'
+ ]
endif
if build_eglstream
eglstream_protodir = eglstream_dep.get_pkgconfig_variable('pkgdatadir')
@@ -111,7 +114,6 @@ if build_glamor
srcs += 'xwayland-glamor-eglstream.c'
endif
- srcs += 'xwayland-present.c'
if build_xv
srcs += 'xwayland-glamor-xv.c'
endif
diff --git a/hw/xwayland/xwayland-screen.c b/hw/xwayland/xwayland-screen.c
index 46ab4fed7..ac7238b96 100644
--- a/hw/xwayland/xwayland-screen.c
+++ b/hw/xwayland/xwayland-screen.c
@@ -943,10 +943,11 @@ xwl_screen_init(ScreenPtr pScreen, int argc, char **argv)
xwl_screen->glamor = 0;
}
}
-
+#ifdef GLAMOR_HAS_GBM
if (xwl_screen->glamor && xwl_screen->rootless)
xwl_screen->present = xwl_present_init(pScreen);
-#endif
+#endif /* GLAMOR_HAS_GBM */
+#endif /* XWL_HAS_GLAMOR */
if (!xwl_screen->glamor) {
xwl_screen->CreateScreenResources = pScreen->CreateScreenResources;