From f5290242f38a0eeb5d1ff29539dceb613bd46177 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 17 Oct 2026 19:37:34 +0200 Subject: [PATCH] Don't throttle the first Wayland frame on unknown focus state. --- profiler/src/BackendWayland.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/profiler/src/BackendWayland.cpp b/profiler/src/BackendWayland.cpp index 672b3fd7..555b41a5 100644 --- a/profiler/src/BackendWayland.cpp +++ b/profiler/src/BackendWayland.cpp @@ -1143,9 +1143,11 @@ void Backend::Run() #endif timespec zero = {}; + bool first = true; while( s_running && wl_display_dispatch_timeout( s_dpy, &zero ) != -1 ) { - if( tracy::s_config.focusLostLimit && !s_hasFocus ) std::this_thread::sleep_for( std::chrono::milliseconds( 50 ) ); + if( !first && tracy::s_config.focusLostLimit && !s_hasFocus ) std::this_thread::sleep_for( std::chrono::milliseconds( 50 ) ); + first = false; s_redraw(); s_mainThreadTasks->Run(); }