summaryrefslogtreecommitdiff
path: root/src/protocols/LayerShell.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/protocols/LayerShell.cpp')
-rw-r--r--src/protocols/LayerShell.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/protocols/LayerShell.cpp b/src/protocols/LayerShell.cpp
index ced765fd..962b89a3 100644
--- a/src/protocols/LayerShell.cpp
+++ b/src/protocols/LayerShell.cpp
@@ -1,5 +1,6 @@
#include "LayerShell.hpp"
#include "../Compositor.hpp"
+#include "XDGShell.hpp"
#define LOGM PROTO::layerShell->protoLog
@@ -118,14 +119,14 @@ CLayerShellResource::CLayerShellResource(SP<CZwlrLayerSurfaceV1> resource_, wlr_
});
resource->setGetPopup([this](CZwlrLayerSurfaceV1* r, wl_resource* popup_) {
- auto popup = wlr_xdg_popup_from_resource(popup_);
+ auto popup = CXDGPopupResource::fromResource(popup_);
- if (popup->parent) {
+ if (popup->taken) {
r->error(-1, "Parent already exists!");
return;
}
- popup->parent = surface;
+ popup->taken = true;
events.newPopup.emit(popup);
});