mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 04:45:58 +01:00
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
This commit is contained in:
parent
5079000e49
commit
8acaabcbab
1 changed files with 4 additions and 5 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue