summaryrefslogtreecommitdiff
path: root/src/managers/input/InputManager.cpp
diff options
context:
space:
mode:
authorvaxerski <vaxry@vaxry.net>2023-01-03 13:06:13 +0100
committervaxerski <vaxry@vaxry.net>2023-01-03 13:06:18 +0100
commit3d1b255199db3ce9539befcd8547331b312a34e7 (patch)
treea66aba994d05e86654d8c1ddd882ec73f393d8c1 /src/managers/input/InputManager.cpp
parent0b26b1eed68c5ece7aa6f93f3ef4df9bac9b7cdf (diff)
update constraint on constraint state region commit
Diffstat (limited to 'src/managers/input/InputManager.cpp')
-rw-r--r--src/managers/input/InputManager.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp
index ec2446b1..c67bcba3 100644
--- a/src/managers/input/InputManager.cpp
+++ b/src/managers/input/InputManager.cpp
@@ -1041,6 +1041,16 @@ void Events::listener_commitConstraint(void* owner, void* data) {
PCONSTRAINT->hintSet = true;
}
}
+
+ if (PMOUSE->currentConstraint->current.committed & WLR_POINTER_CONSTRAINT_V1_STATE_REGION) {
+ if (pixman_region32_not_empty(&PMOUSE->currentConstraint->current.region)) {
+ pixman_region32_intersect(&PMOUSE->currentConstraint->region, &PMOUSE->currentConstraint->surface->input_region, &PMOUSE->currentConstraint->current.region);
+ } else {
+ pixman_region32_copy(&PMOUSE->currentConstraint->region, &PMOUSE->currentConstraint->surface->input_region);
+ }
+
+ g_pInputManager->recheckConstraint(PMOUSE);
+ }
}
void CInputManager::updateCapabilities() {