backend/drm: don't set cursor if off-screen

Closes: https://github.com/swaywm/wlroots/issues/2216
This commit is contained in:
Simon Ser 2020-05-27 18:16:03 +02:00 committed by Drew DeVault
parent 5947160630
commit e7a8ea84c3
4 changed files with 14 additions and 2 deletions

View file

@ -62,7 +62,7 @@ static bool legacy_crtc_commit(struct wlr_drm_backend *drm,
}
}
if (cursor != NULL && cursor->cursor_enabled) {
if (cursor != NULL && drm_connector_is_cursor_visible(conn)) {
struct wlr_drm_fb *cursor_fb = plane_get_next_fb(cursor);
struct gbm_bo *cursor_bo =
drm_fb_acquire(cursor_fb, drm, &cursor->mgpu_surf);