mirror of
https://github.com/hyprwm/Hyprland.git
synced 2024-12-27 17:55:24 +03: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
@ -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 New Issue
Block a user