diff options
author | Simon Ser <contact@emersion.fr> | 2021-06-13 14:22:24 +0200 |
---|---|---|
committer | Kenny Levinsen <kl@kl.wtf> | 2021-06-17 00:25:27 +0200 |
commit | 6c3d080e25e56404228ad7704eed43e40fa0c623 (patch) | |
tree | f6f304b3a9bb2a9b34e93a26a5c7eaba2c69fecb /backend | |
parent | 6259fd23fbaecbea5a5fb71f2a0bf3735b4c17cd (diff) |
backend/drm: populate cursor plane's current_fb
The set_cursor() hook is a little bit special: it's not really
synchronized to commit() or test(). Once set_cursor() returns true,
the new cursor is part of the current state.
This fixes a state where wlr_drm_connector.cursor_enabled is true
but there is no FB available. This is triggered by set_cursor()
followed by a failed commit(), which resets pending_fb.
We should definitely fix the output interface to make the cursor part
of the pending state, but that's a more involved change.
Diffstat (limited to 'backend')
-rw-r--r-- | backend/drm/drm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c index 35aa773a..caf27d71 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -920,7 +920,7 @@ static bool drm_connector_set_cursor(struct wlr_output *output, local_buf = wlr_buffer_lock(buffer); } - bool ok = drm_fb_import(&plane->pending_fb, drm, local_buf, + bool ok = drm_fb_import(&plane->current_fb, drm, local_buf, &plane->formats); wlr_buffer_unlock(local_buf); if (!ok) { |