From fc72df8e58bc127442a245f2f29a3246acf77cce Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sat, 11 May 2024 01:02:57 +0100 Subject: seatmgr: Add a grab class --- src/protocols/XDGShell.hpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src/protocols/XDGShell.hpp') 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 owner; - WP self; + WP owner; + WP self; private: SP resource; @@ -244,6 +245,14 @@ class CXDGShellProtocol : public IWaylandProtocol { std::vector> m_vToplevels; std::vector> m_vPopups; + // current popup grab + WP grabOwner; + SP grab; + std::vector> grabbed; + + void addOrStartGrab(SP popup); + void onPopupDestroy(WP popup); + friend class CXDGWMBase; friend class CXDGPositionerResource; friend class CXDGSurfaceResource; -- cgit v1.2.3