Add wayland backend cursor support

This commit is contained in:
nyorain 2017-08-14 18:19:42 +02:00 committed by Drew DeVault
parent 53052b3f6e
commit d7dcbbc175
5 changed files with 268 additions and 1 deletions

View file

@ -27,6 +27,7 @@ struct wlr_wl_backend {
struct wl_shell *shell;
struct wl_shm *shm;
struct wl_seat *seat;
struct wl_pointer *pointer;
char *seat_name;
};
@ -38,6 +39,14 @@ struct wlr_wl_backend_output {
struct wl_shell_surface *shell_surface;
struct wl_egl_window *egl_window;
struct wl_callback *frame_callback;
struct wl_shm_pool *cursor_pool;
void *cursor_buffer; // actually a (client-side) struct wl_buffer*
uint8_t *cursor_data;
struct wl_surface *cursor_surface;
uint32_t cursor_buf_size;
uint32_t enter_serial;
void *egl_surface;
};
@ -55,6 +64,7 @@ struct wlr_wl_pointer {
};
void wlr_wl_registry_poll(struct wlr_wl_backend *backend);
void wlr_wl_output_update_cursor(struct wlr_wl_backend_output *output, uint32_t serial);
struct wlr_wl_backend_output *wlr_wl_output_for_surface(
struct wlr_wl_backend *backend, struct wl_surface *surface);