mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
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.
This commit is contained in:
parent
6259fd23fb
commit
6c3d080e25
1 changed files with 1 additions and 1 deletions
|
|
@ -920,7 +920,7 @@ static bool drm_connector_set_cursor(struct wlr_output *output,
|
||||||
local_buf = wlr_buffer_lock(buffer);
|
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);
|
&plane->formats);
|
||||||
wlr_buffer_unlock(local_buf);
|
wlr_buffer_unlock(local_buf);
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue