atagen

monolith

public
Star0
Watch0

Commit 27a616ba8b50

tarball

atagen <boss@atagen.co>2026-10-19 08:55 UTC

1 file changed+5-3
drm: let a fullscreen window's rule force adaptive sync

want_vrr followed only the global output.vrr setting, so one game could not opt in or out. The rule of the window fullscreen on the output now overrides it, still gated on the output being vrr capable.
Modified file: crates/monolith/src/drm.rs+5 additions−3 deletions
@@ -965,12 +965,14 @@ fn render_surface(state: &mut State, crtc: crtc::Handle, target: u64) -> bool {
965965 return false;
966966 }
967967 surface.cursor_redraw = false;
968+ let fullscreen = wm.layout.arrange(surface.id).fullscreen;
969+ let forced = fullscreen.and_then(|w| wm.get(w)?.rule.vrr);
968970 let want_vrr = surface.vrr_capable
969- && match settings.config.output.vrr {
971+ && forced.unwrap_or(match settings.config.output.vrr {
970972 Vrr::Off => false,
971973 Vrr::On => true,
972- Vrr::Fullscreen => wm.layout.arrange(surface.id).fullscreen.is_some(),
973- };
974+ Vrr::Fullscreen => fullscreen.is_some(),
975+ });
974976 if want_vrr != surface.vrr_on {
975977 match surface.drm.with_compositor(|c| c.use_vrr(want_vrr)) {
976978 Ok(()) => {