backend/headless: accept hardware cursors

When running headless, remoting programs (e.g. VNC servers) might
want to capture outputs without the cursor, and send the cursor
image separately.
This commit is contained in:
Simon Ser 2024-04-26 18:48:19 +02:00
parent 248e837cb3
commit 82f9cd5310

View file

@ -79,6 +79,15 @@ static bool output_commit(struct wlr_output *wlr_output,
return true; return true;
} }
static bool output_set_cursor(struct wlr_output *wlr_output,
struct wlr_buffer *buffer, int hotspot_x, int hotspot_y) {
return true;
}
static bool output_move_cursor(struct wlr_output *wlr_output, int x, int y) {
return true;
}
static void output_destroy(struct wlr_output *wlr_output) { static void output_destroy(struct wlr_output *wlr_output) {
struct wlr_headless_output *output = headless_output_from_output(wlr_output); struct wlr_headless_output *output = headless_output_from_output(wlr_output);
@ -93,6 +102,8 @@ static const struct wlr_output_impl output_impl = {
.destroy = output_destroy, .destroy = output_destroy,
.test = output_test, .test = output_test,
.commit = output_commit, .commit = output_commit,
.set_cursor = output_set_cursor,
.move_cursor = output_move_cursor,
}; };
bool wlr_output_is_headless(struct wlr_output *wlr_output) { bool wlr_output_is_headless(struct wlr_output *wlr_output) {