fix(gui): disable vsync to workaround hang when window is unmapped

This commit is contained in:
CJ van den Berg 2026-04-08 21:22:23 +02:00
parent fc5d225fba
commit 61c7fbfbb7
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -406,6 +406,13 @@ fn wioLoop() void {
defer window.destroy(); defer window.destroy();
window.makeContextCurrent(); window.makeContextCurrent();
// Disable EGL vsync throttling so eglSwapBuffers() returns immediately.
// Without this, eglSwapBuffers() blocks waiting for a frame callback from
// the compositor. Compositors do not send frame callbacks for surfaces on
// background virtual desktops, so any paint while the window is hidden
// causes eglSwapBuffers() to stall indefinitely, freezing the Wayland
// event loop and triggering an "Application Not Responding" dialog.
window.swapInterval(0);
sg.setup(.{ sg.setup(.{
.logger = .{ .func = slog.func }, .logger = .{ .func = slog.func },