From 30c28ff8f774546c6e930ed3acf717434df55371 Mon Sep 17 00:00:00 2001 From: Simon Zeni Date: Thu, 27 Jun 2019 13:55:34 -0400 Subject: introduce wlr_drm_lease_v1 This prevents sway from extending the desktop to i.e. VR headsets, and makes them available for DRM leasing. Non-desktop wlr_outputs will be offered through the wlr_drm_lease_v1_manager interface for client to lease. --- sway/desktop/output.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'sway/desktop') diff --git a/sway/desktop/output.c b/sway/desktop/output.c index 2f2ab4bc..a980e958 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c @@ -4,8 +4,10 @@ #include #include #include +#include #include #include +#include #include #include #include @@ -836,7 +838,17 @@ static void handle_present(struct wl_listener *listener, void *data) { void handle_new_output(struct wl_listener *listener, void *data) { struct sway_server *server = wl_container_of(listener, server, new_output); struct wlr_output *wlr_output = data; - sway_log(SWAY_DEBUG, "New output %p: %s", wlr_output, wlr_output->name); + sway_log(SWAY_DEBUG, "New output %p: %s (non-desktop: %d)", + wlr_output, wlr_output->name, wlr_output->non_desktop); + + if (wlr_output->non_desktop) { + sway_log(SWAY_DEBUG, "Not configuring non-desktop output"); + if (server->drm_lease_manager) { + wlr_drm_lease_v1_manager_offer_output(server->drm_lease_manager, + wlr_output); + } + return; + } struct sway_output *output = output_create(wlr_output); if (!output) { -- cgit v1.2.3