wayland/drmlease: split up DrmLeaseV1Interface::deny
This commit is contained in:
parent
919b56e9a2
commit
9ac3c64d4c
3 changed files with 15 additions and 4 deletions
|
@ -244,7 +244,7 @@ bool DrmGpu::updateOutputs()
|
|||
}
|
||||
}
|
||||
if (!leaseActive) {
|
||||
leaseOutput->lease()->deny();
|
||||
leaseOutput->lease()->revoke();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue