From 2396733f890b0a5740dfc90a0e1b6099577f3b94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Gr=C3=A9goire?= Date: Tue, 9 Sep 2025 14:29:50 +0200 Subject: [PATCH] Fix timeline cropper triggered on hover of other windows --- profiler/src/profiler/TracyView_ZoneTimeline.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profiler/src/profiler/TracyView_ZoneTimeline.cpp b/profiler/src/profiler/TracyView_ZoneTimeline.cpp index 0110dc8c..69cd428c 100644 --- a/profiler/src/profiler/TracyView_ZoneTimeline.cpp +++ b/profiler/src/profiler/TracyView_ZoneTimeline.cpp @@ -64,7 +64,7 @@ void View::DrawThread( const TimelineContext& ctx, const ThreadData& thread, con // Display cropper if currently limited or if hovering the cropper area const auto threadDepthLimitIt = m_threadDepthLimit.find( thread.id ); const bool croppingActive = ( threadDepthLimitIt != m_threadDepthLimit.end() && threadDepthLimitIt->second <= depth ); - const bool mouseInCropperDisplayZone = ImGui::GetMousePos().x >= 0 && ImGui::GetMousePos().x < wpos.x + cropperAdditionalMargin && ImGui::GetMousePos().y > ctx.yMin && ImGui::GetMousePos().y < ctx.yMax; + const bool mouseInCropperDisplayZone = ctx.hover && ImGui::GetMousePos().x >= wpos.x && ImGui::GetMousePos().x < wpos.x + cropperAdditionalMargin && ImGui::GetMousePos().y > ctx.yMin && ImGui::GetMousePos().y < ctx.yMax; const bool displayCropper = croppingActive || mouseInCropperDisplayZone; if( displayCropper )