summaryrefslogtreecommitdiff
path: root/src/desktop/Subsurface.hpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2025-02-01 15:08:30 +0000
committerVaxry <vaxry@vaxry.net>2025-02-01 15:08:30 +0000
commitc6f672257bd2ae98f4fd7a6a273b2d1d3e944baa (patch)
tree3b331626749173588719ac4303dd347af0820e5e /src/desktop/Subsurface.hpp
parent5b43c106bd1cde9ac0b5626130890cde4de0b245 (diff)
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
Diffstat (limited to 'src/desktop/Subsurface.hpp')
-rw-r--r--src/desktop/Subsurface.hpp10
1 files changed, 6 insertions, 4 deletions
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<CPopup> pOwner);
+ static UP<CSubsurface> create(PHLWINDOW pOwner);
+ static UP<CSubsurface> create(WP<CPopup> pOwner);
// real nodes
- CSubsurface(SP<CWLSubsurfaceResource> pSubsurface, PHLWINDOW pOwner);
- CSubsurface(SP<CWLSubsurfaceResource> pSubsurface, WP<CPopup> pOwner);
+ static UP<CSubsurface> create(SP<CWLSubsurfaceResource> pSubsurface, PHLWINDOW pOwner);
+ static UP<CSubsurface> create(SP<CWLSubsurfaceResource> pSubsurface, WP<CPopup> pOwner);
~CSubsurface() = default;
@@ -37,6 +37,8 @@ class CSubsurface {
WP<CSubsurface> m_pSelf;
private:
+ CSubsurface() = default;
+
struct {
CHyprSignalListener destroySubsurface;
CHyprSignalListener commitSubsurface;