From efbc86ef6df9db424e0428f61f5f95de08caeaee Mon Sep 17 00:00:00 2001 From: Xaver Hugl Date: Thu, 15 Dec 2022 18:49:34 +0100 Subject: [PATCH] wayland/drmlease: invalidate lease requests with invalid connectors --- src/wayland/drmlease_v1_interface.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/wayland/drmlease_v1_interface.cpp b/src/wayland/drmlease_v1_interface.cpp index 266dee984c..2022653848 100644 --- a/src/wayland/drmlease_v1_interface.cpp +++ b/src/wayland/drmlease_v1_interface.cpp @@ -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"); } else if (connector->withdrawn()) { qCWarning(KWIN_CORE) << "DrmLease: withdrawn connector requested"; + invalidate(); } else if (m_connectors.contains(connector)) { 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; } } else { qCWarning(KWIN_CORE, "DrmLease: Invalid connector requested"); + invalidate(); } }