summaryrefslogtreecommitdiff
path: root/src/helpers/SubsurfaceTree.hpp
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2024-02-29 00:03:28 +0000
committerGitHub <noreply@github.com>2024-02-29 00:03:28 +0000
commitb1c0f1cc018d13ac1e5ebccaade5528ec757bd74 (patch)
tree11f62bf58b902b0c0b1732ed3f66aa601dae49fd /src/helpers/SubsurfaceTree.hpp
parent1e7eb3a5a5419f97b61a3403880b161c85dd7b17 (diff)
subsurface: Rewrite the subsurface tree (#4877)
Diffstat (limited to 'src/helpers/SubsurfaceTree.hpp')
-rw-r--r--src/helpers/SubsurfaceTree.hpp60
1 files changed, 0 insertions, 60 deletions
diff --git a/src/helpers/SubsurfaceTree.hpp b/src/helpers/SubsurfaceTree.hpp
deleted file mode 100644
index 7a8b8fb8..00000000
--- a/src/helpers/SubsurfaceTree.hpp
+++ /dev/null
@@ -1,60 +0,0 @@
-#pragma once
-
-#include "../defines.hpp"
-#include <list>
-#include "WLSurface.hpp"
-
-struct SSubsurface;
-class CWindow;
-
-typedef void (*applyGlobalOffsetFn)(void*, int*, int*);
-
-struct SSurfaceTreeNode {
- CWLSurface* pSurface = nullptr; // actual surface
- CWLSurface pInternalSurface; // not present for head nodes to not dupe wlr_surface ownership
-
- DYNLISTENER(newSubsurface);
- DYNLISTENER(commit);
- DYNLISTENER(destroy);
-
- SSurfaceTreeNode* pParent = nullptr;
- SSubsurface* pSubsurface = nullptr;
-
- std::list<SSubsurface> childSubsurfaces;
-
- applyGlobalOffsetFn offsetfn;
- void* globalOffsetData;
- CWindow* pWindowOwner = nullptr;
-
- Vector2D lastSize;
-
- //
- bool operator==(const SSurfaceTreeNode& rhs) const {
- return pSurface == rhs.pSurface;
- }
-};
-
-struct SSubsurface {
- wlr_subsurface* pSubsurface = nullptr;
-
- SSurfaceTreeNode* pParent = nullptr;
- SSurfaceTreeNode* pChild = nullptr;
-
- DYNLISTENER(map);
- DYNLISTENER(unmap);
- DYNLISTENER(destroy);
-
- CWindow* pWindowOwner = nullptr;
-
- //
- bool operator==(const SSubsurface& rhs) const {
- return pSubsurface == rhs.pSubsurface;
- }
-};
-
-namespace SubsurfaceTree {
- SSurfaceTreeNode* createTreeRoot(wlr_surface*, applyGlobalOffsetFn, void*, CWindow* pWindow = nullptr);
- void destroySurfaceTree(SSurfaceTreeNode*);
-
- inline std::list<SSurfaceTreeNode> surfaceTreeNodes;
-};