Fix constrained check

The value in parantheses was always zero.
This commit is contained in:
David Redondo 2023-12-20 15:24:43 +01:00
parent d379bc8d8e
commit 80c9cc60ea

View File

@ -144,8 +144,8 @@ void QWaylandLayerSurface::setLayer(uint32_t layer)
void QWaylandLayerSurface::setWindowGeometry(const QRect &geometry) void QWaylandLayerSurface::setWindowGeometry(const QRect &geometry)
{ {
const bool horizontallyConstrained = m_interface->anchors() & (Window::AnchorLeft & Window::AnchorRight); const bool horizontallyConstrained = m_interface->anchors().testFlags({Window::AnchorLeft, Window::AnchorRight});
const bool verticallyConstrained = m_interface->anchors() & (Window::AnchorTop & Window::AnchorBottom); const bool verticallyConstrained = m_interface->anchors().testFlags({Window::AnchorTop, Window::AnchorBottom});
QSize size = geometry.size(); QSize size = geometry.size();
if (horizontallyConstrained) { if (horizontallyConstrained) {