From 51b1b17fcbb6c13667710a6bebac1003a5231bd2 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Wed, 28 Feb 2024 17:53:17 +0000 Subject: [PATCH] subsurfaceTree: assign surfaces to a CWLSurface fixes #4872 --- src/helpers/SubsurfaceTree.cpp | 1 + src/helpers/SubsurfaceTree.hpp | 1 + 2 files changed, 2 insertions(+) diff --git a/src/helpers/SubsurfaceTree.cpp b/src/helpers/SubsurfaceTree.cpp index b4ea6d85..9f53e8ad 100644 --- a/src/helpers/SubsurfaceTree.cpp +++ b/src/helpers/SubsurfaceTree.cpp @@ -145,6 +145,7 @@ void Events::listener_newSubsurfaceNode(void* owner, void* data) { const auto PSUBSURFACE = (wlr_subsurface*)data; const auto PNEWSUBSURFACE = &pNode->childSubsurfaces.emplace_back(); + PNEWSUBSURFACE->surface.assign(PSUBSURFACE->surface); Debug::log(LOG, "Added a new subsurface {:x}", (uintptr_t)PSUBSURFACE); diff --git a/src/helpers/SubsurfaceTree.hpp b/src/helpers/SubsurfaceTree.hpp index 7a8b8fb8..811c8f66 100644 --- a/src/helpers/SubsurfaceTree.hpp +++ b/src/helpers/SubsurfaceTree.hpp @@ -36,6 +36,7 @@ struct SSurfaceTreeNode { struct SSubsurface { wlr_subsurface* pSubsurface = nullptr; + CWLSurface surface; SSurfaceTreeNode* pParent = nullptr; SSurfaceTreeNode* pChild = nullptr;