From a8e0dead355c23d0f38ad0a431a5888ea9eeb7d9 Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Fri, 16 Oct 2026 02:42:22 +0200 Subject: [PATCH] Wayland: VSync off draws uncapped in a window pre_present_notify ties winit's RedrawRequested to the compositor's frame callbacks on Wayland, one per refresh, so a window drew at the monitor's rate whatever the present mode. Only Fifo (VSync) asks for that pacing now; Mailbox and Immediate draw as fast as the frame limit allows, like vanilla's GLFW window. Fixes #441 Co-Authored-By: Claude Opus 5.5 --- crates/horizon-client/src/gfx.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/horizon-client/src/gfx.rs b/crates/horizon-client/src/gfx.rs index 6b0d046ee..c8b8f728b 100644 --- a/crates/horizon-client/src/gfx.rs +++ b/crates/horizon-client/src/gfx.rs @@ -2534,7 +2534,12 @@ impl Renderer { } let present = Instant::now(); if let Some(surface_frame) = surface_frame { - self.window.pre_present_notify(); + // On Wayland this ties RedrawRequested to the compositor's frame + // callbacks, one per refresh. Only VSync (Fifo) waits for the + // display: with it off, vanilla's window draws uncapped. + if self.config.present_mode == wgpu::PresentMode::Fifo { + self.window.pre_present_notify(); + } self.queue.present(surface_frame); if reconfigure && let Some(surface) = &self.surface { surface.configure(&self.device, &self.config);