1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-01 16:38:31 +00:00

Wayland: Fix engine stalls wihle waiting frames

There were two edge cases in the frame waiting logic (aka manual frame
throttling or emulated vsync) which would cause the editor to stall in
one way or another:

 1. Waiting right after starting the editor would cause a deadlock
between both threads until something happened in the Wayland event
queue, in turn unblocking the Wayland thread and kickstartin the whole
thing;

 2. Starting the editor (and probably other long-loading stuff) without
low consumption mode would suspend the window and never commit its
surfaces, thus never signaling the compositor that we want frame events.
This commit is contained in:
Riteo
2025-02-10 21:34:42 +01:00
parent 261e7d32d3
commit cbd68eb403
2 changed files with 14 additions and 0 deletions

View File

@@ -1317,6 +1317,10 @@ void DisplayServerWayland::process_events() {
DEBUG_LOG_WAYLAND("Unsuspending from timeout.");
}
}
// Since we're not rendering, nothing is committing the windows'
// surfaces. We have to do it ourselves.
wayland_thread.commit_surfaces();
}
#ifdef DBUS_ENABLED