output/cursor: Lock software cursor on no hw support

There is no need for us to repeatedly try hardware cursors if there is
no support. Lock software cursors to skip future tests.
This commit is contained in:
Kenny Levinsen 2024-09-25 22:18:55 +02:00
parent faf3cd8abe
commit a85eb14f1c

View file

@ -203,6 +203,14 @@ static struct wlr_buffer *render_cursor_buffer(struct wlr_output_cursor *cursor)
const struct wlr_output_cursor_size *sizes =
output->impl->get_cursor_sizes(cursor->output, &sizes_len);
if (sizes == NULL) {
// No cursor support
wlr_log(WLR_DEBUG, "Output '%s' has no cursor support, disabling permanently",
output->name);
output->software_cursor_locks++;
return NULL;
}
bool found = false;
for (size_t i = 0; i < sizes_len; i++) {
struct wlr_output_cursor_size size = sizes[i];