mirror of
https://github.com/hyprwm/Hyprland.git
synced 2024-09-11 21:27:20 +03:00
input: fix hints not being used if committed at the beginning
This commit is contained in:
parent
56adec7c1a
commit
b9b38424b0
@ -1215,8 +1215,16 @@ void CInputManager::constrainMouse(SMouse* pMouse, wlr_pointer_constraint_v1* co
|
||||
pMouse->hyprListener_commitConstraint.removeCallback();
|
||||
|
||||
if (pMouse->currentConstraint) {
|
||||
if (constraint && constraint->current.committed & WLR_POINTER_CONSTRAINT_V1_STATE_CURSOR_HINT)
|
||||
warpMouseToConstraintMiddle(constraintFromWlr(constraint));
|
||||
if (constraint) {
|
||||
const auto PCONSTRAINT = constraintFromWlr(constraint);
|
||||
if (constraint->current.committed & WLR_POINTER_CONSTRAINT_V1_STATE_CURSOR_HINT) {
|
||||
PCONSTRAINT->hintSet = true;
|
||||
PCONSTRAINT->positionHint = {constraint->current.cursor_hint.x, constraint->current.cursor_hint.y};
|
||||
}
|
||||
|
||||
if (constraint->current.committed & WLR_POINTER_CONSTRAINT_V1_STATE_CURSOR_HINT && constraint->type == WLR_POINTER_CONSTRAINT_V1_LOCKED)
|
||||
warpMouseToConstraintMiddle(PCONSTRAINT);
|
||||
}
|
||||
|
||||
wlr_pointer_constraint_v1_send_deactivated(pMouse->currentConstraint);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user