summaryrefslogtreecommitdiff
path: root/src/desktop/Subsurface.cpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2024-02-29 15:07:11 +0000
committerVaxry <vaxry@vaxry.net>2024-02-29 15:07:14 +0000
commit6916d0a6a316d602ff766abe5abffacf929b6801 (patch)
tree42a3008a1cc8925dd97ce3045f2715ae56bc22c9 /src/desktop/Subsurface.cpp
parentbcec082a1c20da4b69d56b0f0f98e00ecb3b5c96 (diff)
surface: unify owners
Diffstat (limited to 'src/desktop/Subsurface.cpp')
-rw-r--r--src/desktop/Subsurface.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/desktop/Subsurface.cpp b/src/desktop/Subsurface.cpp
index dde8d532..ab43f3c3 100644
--- a/src/desktop/Subsurface.cpp
+++ b/src/desktop/Subsurface.cpp
@@ -29,13 +29,13 @@ CSubsurface::CSubsurface(CPopup* pOwner) : m_pPopupParent(pOwner) {
}
CSubsurface::CSubsurface(wlr_subsurface* pSubsurface, CWindow* pOwner) : m_pSubsurface(pSubsurface), m_pWindowParent(pOwner) {
- m_sWLSurface.assign(pSubsurface->surface);
+ m_sWLSurface.assign(pSubsurface->surface, this);
initSignals();
initExistingSubsurfaces();
}
CSubsurface::CSubsurface(wlr_subsurface* pSubsurface, CPopup* pOwner) : m_pSubsurface(pSubsurface), m_pPopupParent(pOwner) {
- m_sWLSurface.assign(pSubsurface->surface);
+ m_sWLSurface.assign(pSubsurface->surface, this);
initSignals();
initExistingSubsurfaces();
}
@@ -254,4 +254,8 @@ void CSubsurface::initExistingSubsurfaces() {
wl_list_for_each(wlrSubsurface, &m_sWLSurface.wlr()->current.subsurfaces_above, current.link) {
::onNewSubsurface(this, wlrSubsurface);
}
-} \ No newline at end of file
+}
+
+Vector2D CSubsurface::size() {
+ return {m_sWLSurface.wlr()->current.width, m_sWLSurface.wlr()->current.height};
+}