Add a new setExclusiveEdge call in the protocol

This can be used to disambiguate the exclusive edge when the anchors are
on a corner (so there  would be 2 candidates)

it's quite quick and dirty mostly to understand if we do want to push
for something along the lines
This commit is contained in:
Marco Martin
2023-12-21 15:38:31 +01:00
parent 7d3194034c
commit 856843a22f
5 changed files with 35 additions and 0 deletions

View File

@ -48,6 +48,10 @@ QWaylandLayerSurface::QWaylandLayerSurface(QWaylandLayerShellIntegration *shell,
connect(m_interface, &Window::exclusionZoneChanged, this, [this]() {
setExclusiveZone(m_interface->exclusionZone());
});
setExclusiveEdge(m_interface->exclusiveEdge());
connect(m_interface, &Window::exclusiveEdgeChanged, this, [this]() {
setExclusiveEdge(m_interface->exclusiveEdge());
});
setMargins(m_interface->margins());
connect(m_interface, &Window::marginsChanged, this, [this]() {
@ -127,6 +131,11 @@ void QWaylandLayerSurface::setExclusiveZone(int32_t zone)
set_exclusive_zone(zone);
}
void QWaylandLayerSurface::setExclusiveEdge(uint32_t edge)
{
set_exclusive_edge(edge);
}
void QWaylandLayerSurface::setMargins(const QMargins &margins)
{
set_margin(margins.top(), margins.right(), margins.bottom(), margins.left());