diff options
author | Simon Ser <contact@emersion.fr> | 2022-11-26 20:15:52 +0100 |
---|---|---|
committer | Simon Zeni <simon@bl4ckb0ne.ca> | 2022-11-28 13:28:15 -0500 |
commit | e795ea6a0c5420fba505de074ad20797a9797d07 (patch) | |
tree | fdc137a8e01fbec768f71808fde815a1b6b3ef1e /sway/desktop | |
parent | 5b64e2fc31ede4777343e06087d7b921b28be674 (diff) |
Make DRM backend optional
Diffstat (limited to 'sway/desktop')
-rw-r--r-- | sway/desktop/output.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index 04bddf86..6999a382 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c @@ -4,11 +4,10 @@ #include <strings.h> #include <time.h> #include <wayland-server-core.h> -#include <wlr/backend/drm.h> +#include <wlr/config.h> #include <wlr/backend/headless.h> #include <wlr/render/wlr_renderer.h> #include <wlr/types/wlr_buffer.h> -#include <wlr/types/wlr_drm_lease_v1.h> #include <wlr/types/wlr_matrix.h> #include <wlr/types/wlr_output_layout.h> #include <wlr/types/wlr_output.h> @@ -31,6 +30,11 @@ #include "sway/tree/view.h" #include "sway/tree/workspace.h" +#if WLR_HAS_DRM_BACKEND +#include <wlr/backend/drm.h> +#include <wlr/types/wlr_drm_lease_v1.h> +#endif + struct sway_output *output_by_name_or_id(const char *name_or_id) { for (int i = 0; i < root->outputs->length; ++i) { struct sway_output *output = root->outputs->items[i]; @@ -923,10 +927,12 @@ void handle_new_output(struct wl_listener *listener, void *data) { if (wlr_output->non_desktop) { sway_log(SWAY_DEBUG, "Not configuring non-desktop output"); struct sway_output_non_desktop *non_desktop = output_non_desktop_create(wlr_output); +#if WLR_HAS_DRM_BACKEND if (server->drm_lease_manager) { wlr_drm_lease_v1_manager_offer_output(server->drm_lease_manager, wlr_output); } +#endif list_add(root->non_desktop_outputs, non_desktop); return; } |