Port to QWaylandShellSurface::attachPopup()

This commit is contained in:
Vlad Zahorodnii 2023-03-20 14:51:06 +02:00
parent 030df45a0d
commit aabd0aa935
2 changed files with 14 additions and 0 deletions

View File

@ -98,6 +98,19 @@ void QWaylandLayerSurface::zwlr_layer_surface_v1_configure(uint32_t serial, uint
}
}
void QWaylandLayerSurface::attachPopup(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";
}
QWaylandShellSurface::attachPopup(popup);
}
void QWaylandLayerSurface::applyConfigure()
{
window()->resizeFromApplyConfigure(m_pendingSize);

View File

@ -36,6 +36,7 @@ public:
void setKeyboardInteractivity(uint32_t interactivity);
void setLayer(uint32_t layer);
void attachPopup(QWaylandShellSurface *popup) override;
void applyConfigure() override;
private: