seatmgr: Add a grab class
This commit is contained in:
parent
0cfdde3d1a
commit
fc72df8e58
12 changed files with 257 additions and 188 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue