@@ -77,6 +77,8 @@ struct drm_compositor {
struct wl_list sprite_list;
int sprites_are_broken;
+ int cursors_are_broken;
+
uint32_t prev_state;
};
@@ -688,6 +690,8 @@ drm_output_set_cursor(struct weston_output *output_base,
return;
if (es->output_mask != (1u << output_base->id))
return;
+ if (c->cursors_are_broken)
+ return;
if (es->buffer == NULL || !wl_buffer_is_shm(es->buffer) ||
es->geometry.width > 64 || es->geometry.height > 64)
return;
@@ -709,6 +713,7 @@ drm_output_set_cursor(struct weston_output *output_base,
if (drmModeSetCursor(c->drm.fd,
output->crtc_id, handle, 64, 64)) {
weston_log("failed to set cursor: %m\n");
+ c->cursors_are_broken = 1;
return;
}
}
@@ -718,6 +723,7 @@ drm_output_set_cursor(struct weston_output *output_base,
if (output->cursor_x != x || output->cursor_y != y) {
if (drmModeMoveCursor(c->drm.fd, output->crtc_id, x, y)) {
weston_log("failed to move cursor: %m\n");
+ c->cursors_are_broken = 1;
return;
}
output->cursor_x = x;