mirror of
https://invent.kde.org/plasma/layer-shell-qt.git
synced 2025-05-25 09:30:22 -04:00
don't always gto trough m_interface
This commit is contained in:
parent
c81b755e97
commit
826b9362c9
@ -44,7 +44,7 @@ QWaylandLayerSurface::QWaylandLayerSurface(QWaylandLayerShellIntegration *shell,
|
||||
setAnchor(m_interface->anchors());
|
||||
connect(m_interface, &Window::anchorsChanged, this, [this]() {
|
||||
setAnchor(m_interface->anchors());
|
||||
m_interface->setDesiredSize(m_window->windowContentGeometry().size());
|
||||
setDesiredSize(m_window->windowContentGeometry().size());
|
||||
});
|
||||
|
||||
setExclusiveZone(m_interface->exclusionZone());
|
||||
@ -61,7 +61,6 @@ QWaylandLayerSurface::QWaylandLayerSurface(QWaylandLayerShellIntegration *shell,
|
||||
setMargins(m_interface->margins());
|
||||
});
|
||||
|
||||
// setDesiredSize is called only by this connection, everywhere else we use m_interface->setDesiredSize()
|
||||
connect(m_interface, &Window::desiredSizeChanged, this, [this]() {
|
||||
setDesiredSize(m_interface->desiredSize());
|
||||
});
|
||||
@ -71,7 +70,7 @@ QWaylandLayerSurface::QWaylandLayerSurface(QWaylandLayerShellIntegration *shell,
|
||||
setKeyboardInteractivity(m_interface->keyboardInteractivity());
|
||||
});
|
||||
|
||||
m_interface->setDesiredSize(window->windowContentGeometry().size());
|
||||
setDesiredSize(window->windowContentGeometry().size());
|
||||
}
|
||||
|
||||
QWaylandLayerSurface::~QWaylandLayerSurface()
|
||||
@ -137,8 +136,6 @@ void QWaylandLayerSurface::setDesiredSize(const QSize &size)
|
||||
effectiveSize.setHeight(0);
|
||||
}
|
||||
set_size(effectiveSize.width(), effectiveSize.height());
|
||||
|
||||
m_window->window()->requestUpdate();
|
||||
}
|
||||
|
||||
void QWaylandLayerSurface::setAnchor(uint anchor)
|
||||
@ -181,12 +178,12 @@ void QWaylandLayerSurface::setWindowGeometry(const QRect &geometry)
|
||||
return;
|
||||
}
|
||||
|
||||
m_interface->setDesiredSize(geometry.size());
|
||||
setDesiredSize(geometry.size());
|
||||
}
|
||||
#else
|
||||
void QWaylandLayerSurface::setWindowSize(const QSize &size)
|
||||
{
|
||||
m_interface->setDesiredSize(size);
|
||||
setDesiredSize(size);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -34,6 +34,7 @@ public:
|
||||
}
|
||||
void attachPopup(QtWaylandClient::QWaylandShellSurface *popup) override;
|
||||
|
||||
void setDesiredSize(const QSize &size);
|
||||
void setAnchor(uint32_t anchor);
|
||||
void setExclusiveZone(int32_t zone);
|
||||
void setExclusiveEdge(uint32_t edge);
|
||||
@ -53,7 +54,6 @@ public:
|
||||
void requestXdgActivationToken(quint32 serial) override;
|
||||
|
||||
private:
|
||||
void setDesiredSize(const QSize &size);
|
||||
void sendExpose();
|
||||
void zwlr_layer_surface_v1_configure(uint32_t serial, uint32_t width, uint32_t height) override;
|
||||
void zwlr_layer_surface_v1_closed() override;
|
||||
|
Loading…
Reference in New Issue
Block a user