From c6f672257bd2ae98f4fd7a6a273b2d1d3e944baa Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sat, 1 Feb 2025 15:08:30 +0000 Subject: desktop: move popup and subsurface ctors to factories makes sure m_pSelf is set before we do anything like possibly adding children fixes #9275 supersedes #9276 --- src/desktop/Subsurface.hpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/desktop/Subsurface.hpp') diff --git a/src/desktop/Subsurface.hpp b/src/desktop/Subsurface.hpp index 41958671..2983c7c1 100644 --- a/src/desktop/Subsurface.hpp +++ b/src/desktop/Subsurface.hpp @@ -10,12 +10,12 @@ class CWLSubsurfaceResource; class CSubsurface { public: // root dummy nodes - CSubsurface(PHLWINDOW pOwner); - CSubsurface(WP pOwner); + static UP create(PHLWINDOW pOwner); + static UP create(WP pOwner); // real nodes - CSubsurface(SP pSubsurface, PHLWINDOW pOwner); - CSubsurface(SP pSubsurface, WP pOwner); + static UP create(SP pSubsurface, PHLWINDOW pOwner); + static UP create(SP pSubsurface, WP pOwner); ~CSubsurface() = default; @@ -37,6 +37,8 @@ class CSubsurface { WP m_pSelf; private: + CSubsurface() = default; + struct { CHyprSignalListener destroySubsurface; CHyprSignalListener commitSubsurface; -- cgit v1.2.3