Merge pull request #1250 from YaLTeR/fix-scrolling

Fix scrolling speed for touchpads and high-res wheels on Wayland
This commit is contained in:
Bartosz Taudul
2026-01-07 23:16:19 +01:00
committed by GitHub
2 changed files with 3 additions and 2 deletions

View File

@@ -338,8 +338,8 @@ static void PointerFrame( void*, struct wl_pointer* pointer )
if( s_wheel )
{
s_wheel = false;
s_wheelAxisX /= 8;
s_wheelAxisY /= 8;
s_wheelAxisX /= 15;
s_wheelAxisY /= 15;
ImGuiIO& io = ImGui::GetIO();
io.AddMouseWheelEvent( wl_fixed_to_double( s_wheelAxisX ), wl_fixed_to_double( s_wheelAxisY ) );
s_wheelAxisX = s_wheelAxisY = 0;

View File

@@ -145,6 +145,7 @@ void View::HandleTimelineMouse( int64_t timespan, const ImVec2& wpos, float w )
else if( io.KeyShift ) mod = 0.5;
mod *= m_verticalScrollMultiplier;
mod *= fabs( wheel );
if( wheel > 0 )
{