mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 21:45:59 +01:00
seat: Send discrete event when axis source is scroll wheel (#6103)
modified: src/managers/SeatManager.cpp modified: src/managers/input/InputManager.cpp Co-authored-by: Agent_00Ming <agent00ming9366@gmail.com>
This commit is contained in:
parent
d693c44836
commit
3ac0e7ead1
2 changed files with 4 additions and 1 deletions
|
@ -298,6 +298,9 @@ void CSeatManager::sendPointerAxis(uint32_t timeMs, wl_pointer_axis axis, double
|
||||||
p->sendAxisSource(source);
|
p->sendAxisSource(source);
|
||||||
p->sendAxisRelativeDirection(axis, relative);
|
p->sendAxisRelativeDirection(axis, relative);
|
||||||
|
|
||||||
|
if (source == 0)
|
||||||
|
p->sendAxisDiscrete(axis, discrete);
|
||||||
|
|
||||||
if (value == 0)
|
if (value == 0)
|
||||||
p->sendAxisStop(timeMs, axis);
|
p->sendAxisStop(timeMs, axis);
|
||||||
}
|
}
|
||||||
|
|
|
@ -774,7 +774,7 @@ void CInputManager::onMouseWheel(IPointer::SAxisEvent e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
g_pSeatManager->sendPointerAxis(e.timeMs, e.axis, factor * e.delta, std::round(factor * e.deltaDiscrete), e.source, WL_POINTER_AXIS_RELATIVE_DIRECTION_IDENTICAL);
|
g_pSeatManager->sendPointerAxis(e.timeMs, e.axis, factor * e.delta, std::round(factor * e.deltaDiscrete / 120), e.source, WL_POINTER_AXIS_RELATIVE_DIRECTION_IDENTICAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector2D CInputManager::getMouseCoordsInternal() {
|
Vector2D CInputManager::getMouseCoordsInternal() {
|
||||||
|
|
Loading…
Reference in a new issue