mirror of
https://invent.kde.org/plasma/layer-shell-qt.git
synced 2025-05-25 09:30:22 -04:00
Port to QWaylandShellSurface::setWindowSize()
This commit is contained in:
parent
c4987c01c7
commit
2d65b01d87
@ -110,9 +110,13 @@ void QWaylandLayerSurface::attachPopup(QtWaylandClient::QWaylandShellSurface *po
|
|||||||
|
|
||||||
void QWaylandLayerSurface::applyConfigure()
|
void QWaylandLayerSurface::applyConfigure()
|
||||||
{
|
{
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(6, 8, 0)
|
||||||
m_configuring = true;
|
m_configuring = true;
|
||||||
|
#endif
|
||||||
window()->resizeFromApplyConfigure(m_pendingSize);
|
window()->resizeFromApplyConfigure(m_pendingSize);
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(6, 8, 0)
|
||||||
m_configuring = false;
|
m_configuring = false;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void QWaylandLayerSurface::setDesiredSize(const QSize &size)
|
void QWaylandLayerSurface::setDesiredSize(const QSize &size)
|
||||||
@ -163,6 +167,7 @@ void QWaylandLayerSurface::setLayer(uint32_t layer)
|
|||||||
set_layer(layer);
|
set_layer(layer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(6, 8, 0)
|
||||||
void QWaylandLayerSurface::setWindowGeometry(const QRect &geometry)
|
void QWaylandLayerSurface::setWindowGeometry(const QRect &geometry)
|
||||||
{
|
{
|
||||||
if (m_configuring) {
|
if (m_configuring) {
|
||||||
@ -171,6 +176,12 @@ void QWaylandLayerSurface::setWindowGeometry(const QRect &geometry)
|
|||||||
|
|
||||||
setDesiredSize(geometry.size());
|
setDesiredSize(geometry.size());
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
void QWaylandLayerSurface::setWindowSize(const QSize &size)
|
||||||
|
{
|
||||||
|
setDesiredSize(size);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
bool QWaylandLayerSurface::requestActivate()
|
bool QWaylandLayerSurface::requestActivate()
|
||||||
{
|
{
|
||||||
|
@ -43,7 +43,11 @@ public:
|
|||||||
void setLayer(uint32_t layer);
|
void setLayer(uint32_t layer);
|
||||||
|
|
||||||
void applyConfigure() override;
|
void applyConfigure() override;
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(6, 8, 0)
|
||||||
void setWindowGeometry(const QRect &geometry) override;
|
void setWindowGeometry(const QRect &geometry) override;
|
||||||
|
#else
|
||||||
|
void setWindowSize(const QSize &size) override;
|
||||||
|
#endif
|
||||||
|
|
||||||
bool requestActivate() override;
|
bool requestActivate() override;
|
||||||
void setXdgActivationToken(const QString &token) override;
|
void setXdgActivationToken(const QString &token) override;
|
||||||
@ -61,7 +65,9 @@ private:
|
|||||||
QString m_activationToken;
|
QString m_activationToken;
|
||||||
|
|
||||||
bool m_configured = false;
|
bool m_configured = false;
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(6, 8, 0)
|
||||||
bool m_configuring = false;
|
bool m_configuring = false;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user