From 54c63c11d459be6c80b69735aa55691124a1a245 Mon Sep 17 00:00:00 2001 From: Marcos Slomp Date: Wed, 18 Feb 2026 14:30:22 -0800 Subject: [PATCH 1/2] ensure touchpad gestures either scroll or zoom the timeline, but not both simultaneously --- profiler/src/profiler/TracyView_Timeline.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/profiler/src/profiler/TracyView_Timeline.cpp b/profiler/src/profiler/TracyView_Timeline.cpp index 9da11658..c689a1a3 100644 --- a/profiler/src/profiler/TracyView_Timeline.cpp +++ b/profiler/src/profiler/TracyView_Timeline.cpp @@ -87,8 +87,8 @@ void View::HandleTimelineMouse( int64_t timespan, const ImVec2& wpos, float w ) } } - const auto hwheel_delta = io.MouseWheelH * 100.f * m_horizontalScrollMultiplier; - if( IsMouseDragging( 1 ) || hwheel_delta != 0 ) + const bool wheel_scroll = abs(io.MouseWheelH) > abs(io.MouseWheel); + if( IsMouseDragging( 1 ) || wheel_scroll ) { m_viewMode = ViewMode::Paused; m_viewModeHeuristicTry = false; @@ -96,6 +96,7 @@ void View::HandleTimelineMouse( int64_t timespan, const ImVec2& wpos, float w ) if( !m_playback.pause && m_playback.sync ) m_playback.pause = true; const auto delta = GetMouseDragDelta( 1 ); m_yDelta = delta.y; + const auto hwheel_delta = io.MouseWheelH * 50.f * m_horizontalScrollMultiplier; const auto dpx = int64_t( (delta.x * nspx) + (hwheel_delta * nspx)); if( dpx != 0 ) { @@ -118,9 +119,10 @@ void View::HandleTimelineMouse( int64_t timespan, const ImVec2& wpos, float w ) } } - const auto wheel = io.MouseWheel; - if( wheel != 0 ) + const bool wheel_zoom = abs(io.MouseWheel) > abs(io.MouseWheelH); + if( wheel_zoom ) { + const auto wheel = io.MouseWheel; if( m_viewMode == ViewMode::LastFrames ) m_viewMode = ViewMode::LastRange; const double mouse = io.MousePos.x - wpos.x; const auto p = mouse / w; From 20932eae88f7ab8cc251719d5f3df0ce3a6f9e2b Mon Sep 17 00:00:00 2001 From: Marcos Slomp Date: Wed, 18 Feb 2026 14:34:39 -0800 Subject: [PATCH 2/2] formatting --- profiler/src/profiler/TracyView_Timeline.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/profiler/src/profiler/TracyView_Timeline.cpp b/profiler/src/profiler/TracyView_Timeline.cpp index c689a1a3..105a41c6 100644 --- a/profiler/src/profiler/TracyView_Timeline.cpp +++ b/profiler/src/profiler/TracyView_Timeline.cpp @@ -87,7 +87,7 @@ void View::HandleTimelineMouse( int64_t timespan, const ImVec2& wpos, float w ) } } - const bool wheel_scroll = abs(io.MouseWheelH) > abs(io.MouseWheel); + const bool wheel_scroll = abs( io.MouseWheelH ) > abs( io.MouseWheel ); if( IsMouseDragging( 1 ) || wheel_scroll ) { m_viewMode = ViewMode::Paused; @@ -119,7 +119,7 @@ void View::HandleTimelineMouse( int64_t timespan, const ImVec2& wpos, float w ) } } - const bool wheel_zoom = abs(io.MouseWheel) > abs(io.MouseWheelH); + const bool wheel_zoom = abs( io.MouseWheel ) > abs( io.MouseWheelH ); if( wheel_zoom ) { const auto wheel = io.MouseWheel;