fix(gui): disable vsync to workaround hang when window is unmapped
This commit is contained in:
parent
fc5d225fba
commit
61c7fbfbb7
1 changed files with 7 additions and 0 deletions
|
|
@ -406,6 +406,13 @@ fn wioLoop() void {
|
|||
defer window.destroy();
|
||||
|
||||
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(.{
|
||||
.logger = .{ .func = slog.func },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue