diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-05-31 22:16:13 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-05-31 22:16:13 +0200 |
| commit | 970018248f44d259cd16c0896862e8b4a464c9b9 (patch) | |
| tree | c7c2f1de0ceac67255a196bd583ff2af9862d5d4 /src/helpers/SubsurfaceTree.hpp | |
| parent | 471654d791abb1ea6c4740572fda6df53e6b24bf (diff) | |
Don't damage surfaces coming from not rendered windows
Diffstat (limited to 'src/helpers/SubsurfaceTree.hpp')
| -rw-r--r-- | src/helpers/SubsurfaceTree.hpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/helpers/SubsurfaceTree.hpp b/src/helpers/SubsurfaceTree.hpp index 32a3013e..52f54f16 100644 --- a/src/helpers/SubsurfaceTree.hpp +++ b/src/helpers/SubsurfaceTree.hpp @@ -4,6 +4,7 @@ #include <list> struct SSubsurface; +class CWindow; typedef void (*applyGlobalOffsetFn)(void *, int *, int *); @@ -21,6 +22,7 @@ struct SSurfaceTreeNode { applyGlobalOffsetFn offsetfn; void *globalOffsetData; + CWindow* pWindowOwner = nullptr; bool operator==(const SSurfaceTreeNode& rhs) { return pSurface == rhs.pSurface; @@ -37,13 +39,15 @@ struct SSubsurface { DYNLISTENER(unmap); DYNLISTENER(destroy); + CWindow* pWindowOwner = nullptr; + bool operator==(const SSubsurface& rhs) { return pSubsurface == rhs.pSubsurface; } }; namespace SubsurfaceTree { - SSurfaceTreeNode* createTreeRoot(wlr_surface*, applyGlobalOffsetFn, void*); + SSurfaceTreeNode* createTreeRoot(wlr_surface*, applyGlobalOffsetFn, void*, CWindow* pWindow = nullptr); void destroySurfaceTree(SSurfaceTreeNode*); inline std::list<SSurfaceTreeNode> surfaceTreeNodes; |
