diff options
| author | Vaxry <vaxry@vaxry.net> | 2024-04-26 23:55:41 +0100 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2024-04-27 03:17:04 +0100 |
| commit | 25aec3ac8ce65ed224f025f8f6dfef73780577a4 (patch) | |
| tree | 9fa63de1670bd2f535f3bc237800fc6b7a81f646 /src/desktop/Constraint.hpp | |
| parent | f94264928a8ab4da8759d4ded25a46af44451d38 (diff) | |
pointer-constraints: move to new impl
Diffstat (limited to 'src/desktop/Constraint.hpp')
| -rw-r--r-- | src/desktop/Constraint.hpp | 44 |
1 files changed, 0 insertions, 44 deletions
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 |
