wayland/drmlease: invalidate lease requests with invalid connectors
This commit is contained in:
parent
c2150988f2
commit
efbc86ef6d
1 changed files with 3 additions and 1 deletions
|
@ -332,13 +332,15 @@ void DrmLeaseRequestV1Interface::wp_drm_lease_request_v1_request_connector(Resou
|
||||||
wl_resource_post_error(resource->handle, WP_DRM_LEASE_REQUEST_V1_ERROR_WRONG_DEVICE, "Requested connector from invalid lease device");
|
wl_resource_post_error(resource->handle, WP_DRM_LEASE_REQUEST_V1_ERROR_WRONG_DEVICE, "Requested connector from invalid lease device");
|
||||||
} else if (connector->withdrawn()) {
|
} else if (connector->withdrawn()) {
|
||||||
qCWarning(KWIN_CORE) << "DrmLease: withdrawn connector requested";
|
qCWarning(KWIN_CORE) << "DrmLease: withdrawn connector requested";
|
||||||
|
invalidate();
|
||||||
} else if (m_connectors.contains(connector)) {
|
} else if (m_connectors.contains(connector)) {
|
||||||
wl_resource_post_error(resource->handle, WP_DRM_LEASE_REQUEST_V1_ERROR_DUPLICATE_CONNECTOR, "Requested connector twice");
|
wl_resource_post_error(resource->handle, WP_DRM_LEASE_REQUEST_V1_ERROR_DUPLICATE_CONNECTOR, "Requested connector twice");
|
||||||
} else {
|
} else if (!m_invalid) {
|
||||||
m_connectors << connector;
|
m_connectors << connector;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
qCWarning(KWIN_CORE, "DrmLease: Invalid connector requested");
|
qCWarning(KWIN_CORE, "DrmLease: Invalid connector requested");
|
||||||
|
invalidate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue