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 GitHub
parent 06b37c3907
commit 0bd11d5eb9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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;
}