From 25aec3ac8ce65ed224f025f8f6dfef73780577a4 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Fri, 26 Apr 2024 23:55:41 +0100 Subject: pointer-constraints: move to new impl --- src/desktop/Constraint.hpp | 44 -------------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 src/desktop/Constraint.hpp (limited to 'src/desktop/Constraint.hpp') diff --git a/src/desktop/Constraint.hpp b/src/desktop/Constraint.hpp deleted file mode 100644 index 34690217..00000000 --- a/src/desktop/Constraint.hpp +++ /dev/null @@ -1,44 +0,0 @@ -#pragma once - -#include "../includes.hpp" -#include "../helpers/Region.hpp" -#include "../helpers/WLListener.hpp" - -class CWLSurface; - -class CConstraint { - public: - CConstraint(wlr_pointer_constraint_v1* constraint, CWLSurface* owner); - ~CConstraint(); - - void onCommit(); - void onDestroy(); - void onSetRegion(); - CRegion logicConstraintRegion(); - bool isLocked(); - Vector2D logicPositionHint(); - - void deactivate(); - void activate(); - bool active(); - - CWLSurface* owner(); - - private: - bool m_bActive = false; - CWLSurface* m_pOwner = nullptr; - wlr_pointer_constraint_v1* m_pConstraint; - - CRegion m_rRegion; - bool m_bHintSet = false; - Vector2D m_vPositionHint = {-1, -1}; - Vector2D m_vCursorPosOnActivate = {-1, -1}; - - // for oneshot constraints that have been activated once - bool m_bDead = false; - - DYNLISTENER(destroyConstraint); - DYNLISTENER(setConstraintRegion); - - void initSignals(); -}; \ No newline at end of file -- cgit v1.2.3