mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 19:26:00 +01:00
tablet: fix mapping when mapped region is specified (#6206)
When `region_size` is set in the config (non-empty `boundBox`), cursor is mapped to wrong coordinate because `CBox::translate` mutates `TAB->boundBox`, making all subsequent coordinate calculations wrong. This also fixes the edge case where user sets `region_position` but not `region_size`.
This commit is contained in:
parent
25b9446949
commit
df80fbf706
1 changed files with 5 additions and 2 deletions
|
@ -696,8 +696,11 @@ void CPointerManager::warpAbsolute(Vector2D abs, SP<IHID> dev) {
|
|||
}
|
||||
}
|
||||
|
||||
if (!TAB->boundBox.empty())
|
||||
mappedArea = TAB->boundBox.translate(currentMonitor->vecPosition);
|
||||
mappedArea.translate(TAB->boundBox.pos());
|
||||
if (!TAB->boundBox.empty()) {
|
||||
mappedArea.w = TAB->boundBox.w;
|
||||
mappedArea.h = TAB->boundBox.h;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case HID_TYPE_TOUCH: {
|
||||
|
|
Loading…
Reference in a new issue