diff options
| author | Vaxry <vaxry@vaxry.net> | 2024-08-03 17:58:06 +0200 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2024-08-03 17:58:06 +0200 |
| commit | ae50f8614d92132d918663ea7551bd68eb13953a (patch) | |
| tree | 566b716cbb4e3c56f2977c8c86dc73e6ccf50524 /src/protocols/XDGShell.cpp | |
| parent | 9f5a57ff4569db57372bd86bd48add85a3a1a5e4 (diff) | |
wayland/surface: fixup self-owning surface roles
fixes #7133
Diffstat (limited to 'src/protocols/XDGShell.cpp')
| -rw-r--r-- | src/protocols/XDGShell.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/protocols/XDGShell.cpp b/src/protocols/XDGShell.cpp index 5e82b530..4aa5d373 100644 --- a/src/protocols/XDGShell.cpp +++ b/src/protocols/XDGShell.cpp @@ -443,10 +443,6 @@ CXDGSurfaceResource::~CXDGSurfaceResource() { surface->resetRole(); } -eSurfaceRole CXDGSurfaceResource::role() { - return SURFACE_ROLE_XDG_SHELL; -} - bool CXDGSurfaceResource::good() { return resource->resource(); } @@ -668,7 +664,7 @@ CXDGWMBase::CXDGWMBase(SP<CXdgWmBase> resource_) : resource(resource_) { RESOURCE->self = RESOURCE; RESOURCE->surface = SURF; - SURF->role = RESOURCE; + SURF->role = makeShared<CXDGSurfaceRole>(RESOURCE); surfaces.emplace_back(RESOURCE); @@ -765,3 +761,7 @@ void CXDGShellProtocol::onPopupDestroy(WP<CXDGPopupResource> popup) { if (popup->surface) grab->remove(popup->surface->surface.lock()); } + +CXDGSurfaceRole::CXDGSurfaceRole(SP<CXDGSurfaceResource> xdg) : xdgSurface(xdg) { + ; +} |
