From 776f2c4e4d8802e54a9fb7b89ea9b51b418c4e49 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Fri, 13 Dec 2024 13:08:18 +0100 Subject: [PATCH] output: adjust warning when hardware cursors are unsupported We'd print "cursor texture size exceeds hardware limitations" when some hardware doesn't support cursors at all. Change the message to better indicate the cause. --- types/output/cursor.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/types/output/cursor.c b/types/output/cursor.c index d8cdd984a..dcb605fac 100644 --- a/types/output/cursor.c +++ b/types/output/cursor.c @@ -195,6 +195,10 @@ static struct wlr_buffer *render_cursor_buffer(struct wlr_output_cursor *cursor) size_t sizes_len = 0; const struct wlr_output_cursor_size *sizes = output->impl->get_cursor_sizes(cursor->output, &sizes_len); + if (sizes_len == 0) { + wlr_log(WLR_DEBUG, "Hardware cursor not supported"); + return NULL; + } bool found = false; for (size_t i = 0; i < sizes_len; i++) {