summaryrefslogtreecommitdiff
path: root/src/helpers
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2023-03-23 00:39:32 +0000
committervaxerski <43317083+vaxerski@users.noreply.github.com>2023-03-23 00:39:32 +0000
commita3fda12ba15286ee412c83a7137fc6cb14afa266 (patch)
tree57dd91d2605ce7d23acb85293abc4cc062de1e23 /src/helpers
parent0268bb9888abf3d3e007960770f3a01385385702 (diff)
window: unassign surface on unmap
Diffstat (limited to 'src/helpers')
-rw-r--r--src/helpers/WLSurface.cpp4
-rw-r--r--src/helpers/WLSurface.hpp1
2 files changed, 5 insertions, 0 deletions
diff --git a/src/helpers/WLSurface.cpp b/src/helpers/WLSurface.cpp
index 38c31e1a..4bb35135 100644
--- a/src/helpers/WLSurface.cpp
+++ b/src/helpers/WLSurface.cpp
@@ -11,6 +11,10 @@ void CWLSurface::assign(wlr_surface* pSurface) {
init();
}
+void CWLSurface::unassign() {
+ destroy();
+}
+
CWLSurface::~CWLSurface() {
destroy();
}
diff --git a/src/helpers/WLSurface.hpp b/src/helpers/WLSurface.hpp
index 78c07673..e3325f99 100644
--- a/src/helpers/WLSurface.hpp
+++ b/src/helpers/WLSurface.hpp
@@ -9,6 +9,7 @@ class CWLSurface {
~CWLSurface();
void assign(wlr_surface* pSurface);
+ void unassign();
CWLSurface(const CWLSurface&) = delete;
CWLSurface(CWLSurface&&) = delete;