backend/wayland: implement the output layer API

The output layer API is implemented using subsurfaces. I chose to
implement this API in the Wayland backend before doing so in the DRM
backend, because it's way easier on Wayland. On DRM, one needs to figure
out how buffers can be mapped to KMS planes (libliftoff can help) and
perform atomic test-only commits (our current DRM backend isn't ready
for this).
This commit is contained in:
Simon Ser 2020-01-09 18:40:22 +01:00
parent 999826a11a
commit d6363c385f
3 changed files with 164 additions and 0 deletions

View file

@ -8,6 +8,7 @@
#include <wlr/backend/wayland.h>
#include <wlr/render/wlr_renderer.h>
#include <wlr/types/wlr_output_layer.h>
#include <wlr/types/wlr_pointer.h>
#include <wlr/render/drm_format_set.h>
@ -31,6 +32,7 @@ struct wlr_wl_backend {
struct wl_event_source *remote_display_src;
struct wl_registry *registry;
struct wl_compositor *compositor;
struct wl_subcompositor *subcompositor;
struct xdg_wm_base *xdg_wm_base;
struct zxdg_decoration_manager_v1 *zxdg_decoration_manager_v1;
struct zwp_pointer_gestures_v1 *zwp_pointer_gestures_v1;
@ -84,6 +86,13 @@ struct wlr_wl_output {
} cursor;
};
struct wlr_wl_output_layer {
struct wlr_output_layer base;
struct wl_surface *surface;
struct wl_subsurface *subsurface;
bool prev_accepted;
};
struct wlr_wl_input_device {
struct wlr_input_device wlr_input_device;
uint32_t fingers;