diff options
Diffstat (limited to 'src/backend/tty.rs')
| -rw-r--r-- | src/backend/tty.rs | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/backend/tty.rs b/src/backend/tty.rs index b5991d3f..f9b9d33c 100644 --- a/src/backend/tty.rs +++ b/src/backend/tty.rs @@ -50,6 +50,7 @@ use smithay::wayland::dmabuf::{DmabufFeedback, DmabufFeedbackBuilder, DmabufGlob use smithay::wayland::drm_lease::{ DrmLease, DrmLeaseBuilder, DrmLeaseRequest, DrmLeaseState, LeaseRejected, }; +use smithay::wayland::presentation::Refresh; use smithay_drm_extras::drm_scanner::{DrmScanEvent, DrmScanner}; use wayland_protocols::wp::linux_dmabuf::zv1::server::zwp_linux_dmabuf_feedback_v1::TrancheFlags; use wayland_protocols::wp::presentation_time::server::wp_presentation_feedback; @@ -1233,10 +1234,17 @@ impl Tty { // Mark the last frame as submitted. match surface.compositor.frame_submitted() { Ok(Some((mut feedback, target_presentation_time))) => { - let refresh = output_state - .frame_clock - .refresh_interval() - .unwrap_or(Duration::ZERO); + let refresh = match output_state.frame_clock.refresh_interval() { + Some(refresh) => { + if output_state.frame_clock.vrr() { + Refresh::Variable(refresh) + } else { + Refresh::Fixed(refresh) + } + } + None => Refresh::Unknown, + }; + // FIXME: ideally should be monotonically increasing for a surface. let seq = meta.sequence as u64; let mut flags = wp_presentation_feedback::Kind::Vsync |
