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

@ -219,7 +219,7 @@ static bool atomic_crtc_commit(struct wlr_drm_backend *drm,
}
set_plane_props(&atom, drm, crtc->primary, crtc->id, 0, 0);
if (crtc->cursor) {
if (crtc->cursor->cursor_enabled) {
if (drm_connector_is_cursor_visible(conn)) {
set_plane_props(&atom, drm, crtc->cursor, crtc->id,
conn->cursor_x, conn->cursor_y);
} else {