aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/protocols/LayerShell.cpp
diff options
context:
space:
mode:
authorVaxry <[email protected]>2024-08-03 17:58:06 +0200
committerVaxry <[email protected]>2024-08-03 17:58:06 +0200
commitae50f8614d92132d918663ea7551bd68eb13953a (patch)
tree566b716cbb4e3c56f2977c8c86dc73e6ccf50524 /src/protocols/LayerShell.cpp
parent9f5a57ff4569db57372bd86bd48add85a3a1a5e4 (diff)
downloadHyprland-ae50f8614d92132d918663ea7551bd68eb13953a.tar.gz
Hyprland-ae50f8614d92132d918663ea7551bd68eb13953a.zip
wayland/surface: fixup self-owning surface roles
fixes #7133
Diffstat (limited to 'src/protocols/LayerShell.cpp')
-rw-r--r--src/protocols/LayerShell.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/protocols/LayerShell.cpp b/src/protocols/LayerShell.cpp
index 295ef4a9..17d3b22a 100644
--- a/src/protocols/LayerShell.cpp
+++ b/src/protocols/LayerShell.cpp
@@ -175,10 +175,6 @@ CLayerShellResource::~CLayerShellResource() {
surface->resetRole();
}
-eSurfaceRole CLayerShellResource::role() {
- return SURFACE_ROLE_LAYER_SHELL;
-}
-
bool CLayerShellResource::good() {
return resource->resource();
}
@@ -245,8 +241,12 @@ void CLayerShellProtocol::onGetLayerSurface(CZwlrLayerShellV1* pMgr, uint32_t id
return;
}
- SURF->role = RESOURCE;
+ SURF->role = makeShared<CLayerShellRole>(RESOURCE);
g_pCompositor->m_vLayers.emplace_back(CLayerSurface::create(RESOURCE));
LOGM(LOG, "New wlr_layer_surface {:x}", (uintptr_t)RESOURCE.get());
}
+
+CLayerShellRole::CLayerShellRole(SP<CLayerShellResource> ls) : layerSurface(ls) {
+ ;
+}