Merge branch 'master' into 'master'

backend/wayland: handle hidpi and subpixel

Closes #854 and #1758

See merge request wlroots/wlroots!3418
This commit is contained in:
Alexander Orzechowski 2023-06-03 15:34:25 +00:00
commit fbbbbb2e5f
5 changed files with 278 additions and 41 deletions

View file

@ -48,9 +48,28 @@ struct wlr_wl_backend {
struct wl_drm *legacy_drm;
struct xdg_activation_v1 *activation_v1;
struct wl_subcompositor *subcompositor;
struct wl_list remote_outputs; // wlr_wl_remote_output.link
char *drm_render_name;
};
struct wlr_wl_remote_output {
struct wl_output *output;
struct wlr_wl_backend *backend;
uint32_t scale;
enum wl_output_subpixel subpixel;
// we use this to identify the output in the
// global registry so that we can remove it later
uint32_t name;
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;
@ -86,12 +105,24 @@ 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;
struct wlr_buffer *buffer;
int32_t hotspot_x, hotspot_y;
} cursor;
};
@ -169,6 +200,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;