mirror of
https://github.com/quickshell-mirror/quickshell.git
synced 2026-10-27 02:54:36 +00:00
layershell: fix protocol error on popup attachment
This commit is contained in:
4 files changed
+16
-2
No files matched your search
@@ -1,4 +1,5 @@
|
||||
#include "surface.hpp"
|
||||
#include <any>
|
||||
|
||||
#include <private/qwaylanddisplay_p.h>
|
||||
#include <private/qwaylandscreen_p.h>
|
||||
@@ -165,3 +166,14 @@ QSize constrainedSize(const Anchors& anchors, const QSize& size) noexcept {
|
||||
anchors.verticalConstraint() ? 0 : size.height()
|
||||
);
|
||||
}
|
||||
|
||||
void QSWaylandLayerSurface::attachPopup(QtWaylandClient::QWaylandShellSurface* popup) {
|
||||
std::any role = popup->surfaceRole();
|
||||
|
||||
if (auto* popupRole = std::any_cast<::xdg_popup*>(&role)) { // NOLINT
|
||||
this->get_popup(*popupRole);
|
||||
} else {
|
||||
qWarning() << "Cannot attach popup" << popup << "to shell surface" << this
|
||||
<< "as the popup is not an xdg_popup.";
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user