mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-02 05:01:56 -07:00
seatmgr: Add a grab class
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user