Implemented mouse constraints
has some todos but mostly works
This commit is contained in:
parent
b0f5e4ab56
commit
7b1eaca840
10 changed files with 531 additions and 4 deletions
|
|
@ -60,6 +60,32 @@ struct SKeyboard {
|
|||
}
|
||||
};
|
||||
|
||||
struct SMouse {
|
||||
wlr_input_device* mouse = nullptr;
|
||||
|
||||
wlr_pointer_constraint_v1* currentConstraint = nullptr;
|
||||
|
||||
pixman_region32_t confinedTo;
|
||||
|
||||
DYNLISTENER(commitConstraint);
|
||||
|
||||
bool operator==(const SMouse& b) {
|
||||
return mouse == b.mouse;
|
||||
}
|
||||
};
|
||||
|
||||
struct SConstraint {
|
||||
SMouse* pMouse = nullptr;
|
||||
wlr_pointer_constraint_v1* constraint = nullptr;
|
||||
|
||||
DYNLISTENER(setConstraintRegion);
|
||||
DYNLISTENER(destroyConstraint);
|
||||
|
||||
bool operator==(const SConstraint& b) {
|
||||
return constraint == b.constraint;
|
||||
}
|
||||
};
|
||||
|
||||
struct SMonitor;
|
||||
|
||||
struct SXDGPopup {
|
||||
|
|
@ -87,6 +113,8 @@ struct SXDGPopup {
|
|||
struct SSeat {
|
||||
wlr_seat* seat = nullptr;
|
||||
wl_client* exclusiveClient = nullptr;
|
||||
|
||||
SMouse* mouse = nullptr;
|
||||
};
|
||||
|
||||
struct SDrag {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue