diff options
| author | Vaxry <vaxry@vaxry.net> | 2024-05-10 23:28:33 +0100 |
|---|---|---|
| committer | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2024-05-14 23:02:24 +0100 |
| commit | 0cfdde3d1acbfbf698af17f6986fbc4d644214da (patch) | |
| tree | 579ac53bc228db6d0feb373448c8e5557d3285d4 /src/protocols/LayerShell.cpp | |
| parent | 121d3a72137d4780602cf245704615f63357ea22 (diff) | |
xdg-shell: move to new impl
Diffstat (limited to 'src/protocols/LayerShell.cpp')
| -rw-r--r-- | src/protocols/LayerShell.cpp | 7 |
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); }); |
