mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
output: Implement drm_lease_v1
Needed for VR to work properly.
This commit is contained in:
parent
b23774e561
commit
57a937bdf2
3 changed files with 43 additions and 0 deletions
15
src/output.c
15
src/output.c
|
|
@ -10,6 +10,7 @@
|
|||
#include "config.h"
|
||||
#include <assert.h>
|
||||
#include <wlr/types/wlr_buffer.h>
|
||||
#include <wlr/types/wlr_drm_lease_v1.h>
|
||||
#include <wlr/types/wlr_output.h>
|
||||
#include <wlr/types/wlr_xdg_output_v1.h>
|
||||
#include <wlr/types/wlr_scene.h>
|
||||
|
|
@ -57,6 +58,20 @@ new_output_notify(struct wl_listener *listener, void *data)
|
|||
struct server *server = wl_container_of(listener, server, new_output);
|
||||
struct wlr_output *wlr_output = data;
|
||||
|
||||
/*
|
||||
* If this is a non-desktop output, offer it for leasing.
|
||||
* We may want to do more logic here in future, if we choose
|
||||
* to offer non-desktop outputs.
|
||||
*/
|
||||
if (wlr_output->non_desktop) {
|
||||
wlr_log(WLR_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;
|
||||
}
|
||||
|
||||
/*
|
||||
* Configures the output created by the backend to use our allocator
|
||||
* and our renderer. Must be done once, before commiting the output
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue