summaryrefslogtreecommitdiff
path: root/src/desktop/Popup.hpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2024-05-10 23:28:33 +0100
committerVaxry <43317083+vaxerski@users.noreply.github.com>2024-05-14 23:02:24 +0100
commit0cfdde3d1acbfbf698af17f6986fbc4d644214da (patch)
tree579ac53bc228db6d0feb373448c8e5557d3285d4 /src/desktop/Popup.hpp
parent121d3a72137d4780602cf245704615f63357ea22 (diff)
xdg-shell: move to new impl
Diffstat (limited to 'src/desktop/Popup.hpp')
-rw-r--r--src/desktop/Popup.hpp31
1 files changed, 15 insertions, 16 deletions
diff --git a/src/desktop/Popup.hpp b/src/desktop/Popup.hpp
index 6aa7ce61..e6c35e68 100644
--- a/src/desktop/Popup.hpp
+++ b/src/desktop/Popup.hpp
@@ -5,6 +5,8 @@
#include "Subsurface.hpp"
#include "../helpers/signal/Listener.hpp"
+class CXDGPopupResource;
+
class CPopup {
public:
// dummy head nodes
@@ -12,7 +14,7 @@ class CPopup {
CPopup(PHLLS pOwner);
// real nodes
- CPopup(wlr_xdg_popup* popup, CPopup* pOwner);
+ CPopup(SP<CXDGPopupResource> popup, CPopup* pOwner);
~CPopup();
@@ -21,7 +23,7 @@ class CPopup {
Vector2D size();
- void onNewPopup(wlr_xdg_popup* popup);
+ void onNewPopup(SP<CXDGPopupResource> popup);
void onDestroy();
void onMap();
void onUnmap();
@@ -45,31 +47,28 @@ class CPopup {
PHLLSREF m_pLayerOwner;
// T2 owners
- CPopup* m_pParent = nullptr;
+ CPopup* m_pParent = nullptr;
- wlr_xdg_popup* m_pWLR = nullptr;
+ WP<CXDGPopupResource> m_pResource;
- Vector2D m_vLastSize = {};
- Vector2D m_vLastPos = {};
+ Vector2D m_vLastSize = {};
+ Vector2D m_vLastPos = {};
- bool m_bRequestedReposition = false;
+ bool m_bRequestedReposition = false;
- bool m_bInert = false;
+ bool m_bInert = false;
//
std::vector<std::unique_ptr<CPopup>> m_vChildren;
std::unique_ptr<CSubsurface> m_pSubsurfaceHead;
- // signals
- DYNLISTENER(newPopup);
- DYNLISTENER(destroyPopup);
- DYNLISTENER(mapPopup);
- DYNLISTENER(unmapPopup);
- DYNLISTENER(commitPopup);
- DYNLISTENER(repositionPopup);
-
struct {
CHyprSignalListener newPopup;
+ CHyprSignalListener destroy;
+ CHyprSignalListener map;
+ CHyprSignalListener unmap;
+ CHyprSignalListener commit;
+ CHyprSignalListener reposition;
} listeners;
void initAllSignals();