protocols/layershell: do not raise protocol error if layer surface is not anchored (#12241)

This commit is contained in:
Aurelle 2025-11-09 16:59:14 +01:00 committed by Vaxry
parent a85c1f16bf
commit b45f304c15
Signed by: vaxry
GPG key ID: 665806380871D640

View file

@ -159,7 +159,7 @@ CLayerShellResource::CLayerShellResource(SP<CZwlrLayerSurfaceV1> resource_, SP<C
return;
}
if (!m_pending.anchor || !(m_pending.anchor & anchor)) {
if (anchor && (!m_pending.anchor || !(m_pending.anchor & anchor))) {
r->error(ZWLR_LAYER_SURFACE_V1_ERROR_INVALID_EXCLUSIVE_EDGE, "Exclusive edge doesn't align with anchor");
return;
}