diff options
author | Vaxry <[email protected]> | 2024-08-03 17:58:06 +0200 |
---|---|---|
committer | Vaxry <[email protected]> | 2024-08-03 17:58:06 +0200 |
commit | ae50f8614d92132d918663ea7551bd68eb13953a (patch) | |
tree | 566b716cbb4e3c56f2977c8c86dc73e6ccf50524 /src/protocols/LayerShell.cpp | |
parent | 9f5a57ff4569db57372bd86bd48add85a3a1a5e4 (diff) | |
download | Hyprland-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.cpp | 10 |
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) { + ; +} |