diff options
| author | Vaxry <vaxry@vaxry.net> | 2024-05-11 01:02:57 +0100 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2024-05-14 23:13:33 +0100 |
| commit | fc72df8e58bc127442a245f2f29a3246acf77cce (patch) | |
| tree | be68c03888760af0c2a13bad4aed224fd6adfaa3 /src/protocols/XDGShell.hpp | |
| parent | 0cfdde3d1acbfbf698af17f6986fbc4d644214da (diff) | |
seatmgr: Add a grab class
Diffstat (limited to 'src/protocols/XDGShell.hpp')
| -rw-r--r-- | src/protocols/XDGShell.hpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/protocols/XDGShell.hpp b/src/protocols/XDGShell.hpp index e214b6ac..1dbeb209 100644 --- a/src/protocols/XDGShell.hpp +++ b/src/protocols/XDGShell.hpp @@ -59,6 +59,7 @@ class CXDGPopupResource { struct { CSignal reposition; + CSignal dismissed; CSignal destroy; // only the role } events; @@ -198,10 +199,10 @@ class CXDGPositionerResource { bool good(); - SXDGPositionerState state; + SXDGPositionerState state; - WP<CXDGWMBase> owner; - WP<CXDGPositionerResource> self; + WP<CXDGWMBase> owner; + WP<CXDGPositionerResource> self; private: SP<CXdgPositioner> resource; @@ -244,6 +245,14 @@ class CXDGShellProtocol : public IWaylandProtocol { std::vector<SP<CXDGToplevelResource>> m_vToplevels; std::vector<SP<CXDGPopupResource>> m_vPopups; + // current popup grab + WP<CXDGPopupResource> grabOwner; + SP<CSeatGrab> grab; + std::vector<WP<CXDGPopupResource>> grabbed; + + void addOrStartGrab(SP<CXDGPopupResource> popup); + void onPopupDestroy(WP<CXDGPopupResource> popup); + friend class CXDGWMBase; friend class CXDGPositionerResource; friend class CXDGSurfaceResource; |
