mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-17 06:46:39 -04:00
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:
parent
faf3cd8abe
commit
a85eb14f1c
1 changed files with 8 additions and 0 deletions
|
|
@ -203,6 +203,14 @@ static struct wlr_buffer *render_cursor_buffer(struct wlr_output_cursor *cursor)
|
||||||
const struct wlr_output_cursor_size *sizes =
|
const struct wlr_output_cursor_size *sizes =
|
||||||
output->impl->get_cursor_sizes(cursor->output, &sizes_len);
|
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;
|
bool found = false;
|
||||||
for (size_t i = 0; i < sizes_len; i++) {
|
for (size_t i = 0; i < sizes_len; i++) {
|
||||||
struct wlr_output_cursor_size size = sizes[i];
|
struct wlr_output_cursor_size size = sizes[i];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue