Make sure that the layer property gets initialised

Much like with the rest of the properties, we should set whichever value
was in the interface and then subscribe to changes in the property.
Otherwise, the layer doesn't get forwarded to the surface if the value
was set before its initialisation.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
This commit is contained in:
Aleix Pol Gonzalez 2024-09-24 14:45:35 +02:00
parent 2dbd1d6eb7
commit 7409bd4cc0

View File

@ -37,6 +37,7 @@ QWaylandLayerSurface::QWaylandLayerSurface(QWaylandLayerShellIntegration *shell,
}
}
init(shell->get_layer_surface(window->waylandSurface()->object(), output, m_interface->layer(), m_interface->scope()));
setLayer(m_interface->layer());
connect(m_interface, &Window::layerChanged, this, [this]() {
setLayer(m_interface->layer());
});