diff --git a/src/backends/drm/drm_gpu.cpp b/src/backends/drm/drm_gpu.cpp index ab78d8a122..7f894e45d7 100644 --- a/src/backends/drm/drm_gpu.cpp +++ b/src/backends/drm/drm_gpu.cpp @@ -244,7 +244,7 @@ bool DrmGpu::updateOutputs() } } if (!leaseActive) { - leaseOutput->lease()->deny(); + leaseOutput->lease()->revoke(); } } } diff --git a/src/wayland/drmleasedevice_v1_interface.cpp b/src/wayland/drmleasedevice_v1_interface.cpp index c82b254242..fba61910c2 100644 --- a/src/wayland/drmleasedevice_v1_interface.cpp +++ b/src/wayland/drmleasedevice_v1_interface.cpp @@ -339,8 +339,14 @@ void DrmLeaseV1Interface::deny() d->finished = true; d->send_finished(); } - if (!d->lesseeId) { - return; +} + +void DrmLeaseV1Interface::revoke() +{ + Q_ASSERT(d->lesseeId != 0); + if (!d->finished) { + d->finished = true; + d->send_finished(); } Q_EMIT d->device->q->leaseRevoked(this); // check if we should offer connectors again diff --git a/src/wayland/drmleasedevice_v1_interface.h b/src/wayland/drmleasedevice_v1_interface.h index 9df065272a..df754d0d88 100644 --- a/src/wayland/drmleasedevice_v1_interface.h +++ b/src/wayland/drmleasedevice_v1_interface.h @@ -102,10 +102,15 @@ public: /** * Deny the lease request. The compositor may call this in response to - * DrmLeaseDeviceV1Interface::leaseRequested or when it detects a lease being ended with libdrm + * DrmLeaseDeviceV1Interface::leaseRequested */ void deny(); + /** + * revoke a granted lease request and offer the leased connectors again + */ + void revoke(); + /** * The connectors this lease (request) encompasses */