Port to QWaylandShellSurface::attachPopup()

This commit is contained in:
Vlad Zahorodnii 2023-04-22 11:32:15 +03:00
parent fdab1544fb
commit 511b92f4ab
2 changed files with 16 additions and 0 deletions

View File

@ -97,6 +97,19 @@ void QWaylandLayerSurface::zwlr_layer_surface_v1_configure(uint32_t serial, uint
}
}
#if QT_VERSION >= QT_VERSION_CHECK(6, 6, 0)
void QWaylandLayerSurface::attachPopup(QtWaylandClient::QWaylandShellSurface *popup)
{
std::any anyRole = popup->surfaceRole();
if (auto role = std::any_cast<::xdg_popup *>(&anyRole)) {
get_popup(*role);
} else {
qCWarning(LAYERSHELLQT) << "Cannot attach popup of unknown type";
}
}
#endif
void QWaylandLayerSurface::applyConfigure()
{
window()->resizeFromApplyConfigure(m_pendingSize);

View File

@ -28,6 +28,9 @@ public:
{
return m_configured;
}
#if QT_VERSION >= QT_VERSION_CHECK(6, 6, 0)
void attachPopup(QtWaylandClient::QWaylandShellSurface *popup) override;
#endif
void setAnchor(uint32_t anchor);
void setExclusiveZone(int32_t zone);