summaryrefslogtreecommitdiff
path: root/src/desktop/Popup.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/Popup.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/Popup.hpp')
-rw-r--r--src/desktop/Popup.hpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/desktop/Popup.hpp b/src/desktop/Popup.hpp
index 6051f7eb..a64af7eb 100644
--- a/src/desktop/Popup.hpp
+++ b/src/desktop/Popup.hpp
@@ -10,11 +10,11 @@ class CXDGPopupResource;
class CPopup {
public:
// dummy head nodes
- CPopup(PHLWINDOW pOwner);
- CPopup(PHLLS pOwner);
+ static SP<CPopup> create(PHLWINDOW pOwner);
+ static SP<CPopup> create(PHLLS pOwner);
// real nodes
- CPopup(SP<CXDGPopupResource> popup, WP<CPopup> pOwner);
+ static SP<CPopup> create(SP<CXDGPopupResource> popup, WP<CPopup> pOwner);
~CPopup();
@@ -45,6 +45,8 @@ class CPopup {
bool m_bMapped = false;
private:
+ CPopup() = default;
+
// T1 owners, each popup has to have one of these
PHLWINDOWREF m_pWindowOwner;
PHLLSREF m_pLayerOwner;