wayland: Send drm-lease-device::done event to the correct resource

When sending the drm_lease_device_v1.done event, we pass a connector
resource, but we need to pass a device resource.
This commit is contained in:
Vlad Zahorodnii 2022-07-06 11:36:55 +03:00
parent 40fb202aed
commit b5ea9381d1

View file

@ -227,7 +227,12 @@ void DrmLeaseConnectorV1InterfacePrivate::withdraw()
withdrawn = true;
for (const auto &resource : resourceMap()) {
send_withdrawn(resource->handle);
DrmLeaseDeviceV1InterfacePrivate::get(device)->send_done(resource->handle);
}
auto devicePrivate = DrmLeaseDeviceV1InterfacePrivate::get(device);
const auto deviceMap = devicePrivate->resourceMap();
for (DrmLeaseDeviceV1InterfacePrivate::Resource *resource : deviceMap) {
devicePrivate->send_done(resource->handle);
}
}
}