Rename VideoMode to VideoModeHandle (#3328)

This commit is contained in:
daxpedda 2023-12-26 22:12:33 +01:00 committed by GitHub
parent 34e42ff94d
commit 658f49b014
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 111 additions and 104 deletions

View file

@ -2,7 +2,7 @@ use std::{env, str, str::FromStr};
use super::*;
use crate::platform_impl::platform::x11::monitor;
use crate::{dpi::validate_scale_factor, platform_impl::platform::x11::VideoMode};
use crate::{dpi::validate_scale_factor, platform_impl::platform::x11::VideoModeHandle};
use log::warn;
use x11rb::protocol::randr::{self, ConnectionExt as _};
@ -46,7 +46,7 @@ impl XConnection {
&self,
resources: &monitor::ScreenResources,
crtc: &randr::GetCrtcInfoReply,
) -> Option<(String, f64, Vec<VideoMode>)> {
) -> Option<(String, f64, Vec<VideoModeHandle>)> {
let output_info = match self
.xcb_connection()
.randr_get_output_info(crtc.outputs[0], x11rb::CURRENT_TIME)
@ -70,7 +70,7 @@ impl XConnection {
// modes in the array in XRRScreenResources
.filter(|x| output_modes.iter().any(|id| x.id == *id))
.map(|mode| {
VideoMode {
VideoModeHandle {
size: (mode.width.into(), mode.height.into()),
refresh_rate_millihertz: monitor::mode_refresh_rate_millihertz(mode)
.unwrap_or(0),