From d52f38c4031c749989c6826b3132667650f1927e Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Fri, 26 Apr 2024 18:48:19 +0200 Subject: [PATCH] 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. --- backend/headless/output.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/backend/headless/output.c b/backend/headless/output.c index 5aaf1bd8..1f81f0b9 100644 --- a/backend/headless/output.c +++ b/backend/headless/output.c @@ -79,6 +79,15 @@ static bool output_commit(struct wlr_output *wlr_output, 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) { struct wlr_headless_output *output = headless_output_from_output(wlr_output); @@ -90,6 +99,8 @@ static void output_destroy(struct wlr_output *wlr_output) { static const struct wlr_output_impl output_impl = { .destroy = output_destroy, .commit = output_commit, + .set_cursor = output_set_cursor, + .move_cursor = output_move_cursor, }; bool wlr_output_is_headless(struct wlr_output *wlr_output) {