aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2023-02-27 11:10:30 +0100
committerSimon Ser <contact@emersion.fr>2023-02-27 11:18:58 +0100
commit8acaabcbab4f08dfae79dbfd9a1b2b5d932137c6 (patch)
tree77fc6eda16523fd2e5027fc73bdeed07925683fa /backend
parent5079000e49d57ef4087167404fe9091252401b35 (diff)
backend: make wlr_backend_autocreate() fail when DRM is missing
When we change the required dependencies for the DRM backend, Meson might auto-disable the backend for users missing the new requirements. This results in confused users [1] because they don't notice the "drm-backend: NO" line burried in the Meson logs, and then get a black screen when starting the compositor. Update wlr_backend_autocreate() to refuse to create a backend with only libinput (without DRM). Users really wanting to start their compositor with a libinput backend and without a DRM backend can manually set WLR_BACKENDS. [1]: https://github.com/swaywm/sway/issues/7457
Diffstat (limited to 'backend')
-rw-r--r--backend/backend.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/backend/backend.c b/backend/backend.c
index a439a8f4..b9f7caab 100644
--- a/backend/backend.c
+++ b/backend/backend.c
@@ -350,11 +350,6 @@ struct wlr_backend *wlr_backend_autocreate(struct wl_display *display,
}
#endif
-#if !(WLR_HAS_LIBINPUT_BACKEND || WLR_HAS_DRM_BACKEND)
- wlr_log(WLR_ERROR, "Neither DRM nor libinput backend support is compiled in");
- goto error;
-#endif
-
// Attempt DRM+libinput
#if WLR_HAS_SESSION
session = session_create_and_wait(display);
@@ -389,6 +384,10 @@ struct wlr_backend *wlr_backend_autocreate(struct wl_display *display,
wlr_log(WLR_ERROR, "Failed to open any DRM device");
goto error;
}
+#else
+ wlr_log(WLR_ERROR, "DRM backend support is not compiled in, "
+ "refusing to start");
+ goto error;
#endif
success: