mirror of
https://github.com/wolfpld/tracy
synced 2025-04-30 12:53:51 +00:00
Fix window focus issues when navigating with WSAD.
This commit is contained in:
parent
7eba104e12
commit
0eef0a8313
@ -277,6 +277,7 @@ private:
|
|||||||
|
|
||||||
void HandleRange( Range& range, int64_t timespan, const ImVec2& wpos, float w );
|
void HandleRange( Range& range, int64_t timespan, const ImVec2& wpos, float w );
|
||||||
void HandleTimelineMouse( int64_t timespan, const ImVec2& wpos, float w, double& pxns );
|
void HandleTimelineMouse( int64_t timespan, const ImVec2& wpos, float w, double& pxns );
|
||||||
|
void HandleTimelineKeyboard( int64_t timespan, const ImVec2& wpos, float w );
|
||||||
|
|
||||||
void AddAnnotation( int64_t start, int64_t end );
|
void AddAnnotation( int64_t start, int64_t end );
|
||||||
|
|
||||||
|
@ -155,6 +155,12 @@ void View::HandleTimelineMouse( int64_t timespan, const ImVec2& wpos, float w, d
|
|||||||
}
|
}
|
||||||
ZoomToRange( t0, t1, !m_worker.IsConnected() || m_viewMode == ViewMode::Paused );
|
ZoomToRange( t0, t1, !m_worker.IsConnected() || m_viewMode == ViewMode::Paused );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void View::HandleTimelineKeyboard( int64_t timespan, const ImVec2& wpos, float w )
|
||||||
|
{
|
||||||
|
assert( timespan > 0 );
|
||||||
|
auto& io = ImGui::GetIO();
|
||||||
|
|
||||||
int64_t nextTimelineRangeStart, nextTimelineRangeEnd;
|
int64_t nextTimelineRangeStart, nextTimelineRangeEnd;
|
||||||
bool anyDeltaApplied = false;
|
bool anyDeltaApplied = false;
|
||||||
@ -280,6 +286,10 @@ void View::DrawTimeline()
|
|||||||
}
|
}
|
||||||
HandleTimelineMouse( timespan, ImGui::GetCursorScreenPos(), w, pxns );
|
HandleTimelineMouse( timespan, ImGui::GetCursorScreenPos(), w, pxns );
|
||||||
}
|
}
|
||||||
|
if( ImGui::IsWindowFocused( ImGuiHoveredFlags_ChildWindows | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem ) )
|
||||||
|
{
|
||||||
|
HandleTimelineKeyboard( timespan, ImGui::GetCursorScreenPos(), w );
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
const auto tbegin = 0;
|
const auto tbegin = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user