mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-26 06:35:58 +01:00
backend/drm: rollback pending CRTC state on test commit
A test commit doesn't apply the pending state. The CRTC state will be populated again if the compositor decides to perform a regular commit afterwards.
This commit is contained in:
parent
034384f5aa
commit
42126c2022
1 changed files with 1 additions and 1 deletions
|
@ -336,7 +336,7 @@ static bool drm_crtc_commit(struct wlr_drm_connector *conn, uint32_t flags) {
|
||||||
get_drm_backend_from_backend(conn->output.backend);
|
get_drm_backend_from_backend(conn->output.backend);
|
||||||
struct wlr_drm_crtc *crtc = conn->crtc;
|
struct wlr_drm_crtc *crtc = conn->crtc;
|
||||||
bool ok = drm->iface->crtc_commit(drm, conn, flags);
|
bool ok = drm->iface->crtc_commit(drm, conn, flags);
|
||||||
if (ok) {
|
if (ok && !(flags & DRM_MODE_ATOMIC_TEST_ONLY)) {
|
||||||
memcpy(&crtc->current, &crtc->pending, sizeof(struct wlr_drm_crtc_state));
|
memcpy(&crtc->current, &crtc->pending, sizeof(struct wlr_drm_crtc_state));
|
||||||
} else {
|
} else {
|
||||||
memcpy(&crtc->pending, &crtc->current, sizeof(struct wlr_drm_crtc_state));
|
memcpy(&crtc->pending, &crtc->current, sizeof(struct wlr_drm_crtc_state));
|
||||||
|
|
Loading…
Reference in a new issue