Don't throttle the first Wayland frame on unknown focus state.

This commit is contained in:
Bartosz Taudul
2026-10-17 19:37:34 +02:00
parent 9e2127e60a
commit f5290242f3

View File

@@ -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();
}