backend/wayland: maintain a list of active outputs for each virtual WL display

This commit is contained in:
Alexander Orzechowski 2022-11-22 19:35:05 -05:00 committed by Alexander Orzechowski
parent 152c58c340
commit ecc3892808
3 changed files with 124 additions and 9 deletions

View file

@ -54,6 +54,7 @@ struct wlr_wl_backend {
struct wlr_wl_remote_output {
struct wl_output *output;
struct wlr_wl_backend *backend;
uint32_t scale;
// we use this to identify the output in the
@ -63,6 +64,11 @@ struct wlr_wl_remote_output {
struct wl_list link; // wlr_wl_backend.remote_outputs
};
struct wlr_wl_active_remote_output {
struct wlr_wl_remote_output *remote_output;
struct wl_list link; // wlr_wl_output.active_remote_outputs
};
struct wlr_wl_buffer {
struct wlr_buffer *buffer;
struct wl_buffer *wl_buffer;
@ -98,9 +104,20 @@ struct wlr_wl_output {
struct xdg_toplevel *xdg_toplevel;
struct zxdg_toplevel_decoration_v1 *zxdg_toplevel_decoration_v1;
struct wl_list presentation_feedbacks;
struct wl_list active_remote_outputs; // wlr_wl_active_remote_output.link
uint32_t enter_serial;
// last requested output size. This is not the actual size that the
// compositor has accepted.
struct {
bool needs_ack;
uint32_t serial;
int32_t width;
int32_t height;
} requested;
struct {
struct wlr_wl_pointer *pointer;
struct wl_surface *surface;
@ -182,6 +199,8 @@ bool create_wl_seat(struct wl_seat *wl_seat, struct wlr_wl_backend *wl,
void destroy_wl_seat(struct wlr_wl_seat *seat);
void destroy_wl_buffer(struct wlr_wl_buffer *buffer);
void surface_update(struct wlr_wl_output *output);
extern const struct wlr_pointer_impl wl_pointer_impl;
extern const struct wlr_tablet_pad_impl wl_tablet_pad_impl;
extern const struct wlr_tablet_impl wl_tablet_impl;