Add EdidProduct, as user data for kms Outputs

This is the same as `libdisplay_info::edid::VendorProduct`, but with
implementations for `Serialize`, `Eq`, etc.
This commit is contained in:
Ian Douglas Scott 2025-03-24 15:20:22 -07:00 committed by Victoria Brekenfeld
parent 2fe5897db0
commit e74eafce2c
3 changed files with 39 additions and 4 deletions

View file

@ -9,7 +9,7 @@ pub use crate::shell::{SeatExt, Shell, Workspace};
pub use crate::state::{Common, State};
pub use crate::wayland::handlers::xdg_shell::popup::update_reactive_popups;
use crate::{
config::{AdaptiveSync, OutputConfig, OutputState},
config::{AdaptiveSync, EdidProduct, OutputConfig, OutputState},
shell::zoom::OutputZoomState,
};
@ -35,6 +35,8 @@ pub trait OutputExt {
fn is_enabled(&self) -> bool;
fn config(&self) -> Ref<'_, OutputConfig>;
fn config_mut(&self) -> RefMut<'_, OutputConfig>;
fn edid(&self) -> Option<&EdidProduct>;
}
struct Vrr(AtomicU8);
@ -158,4 +160,8 @@ impl OutputExt for Output {
.unwrap()
.borrow_mut()
}
fn edid(&self) -> Option<&EdidProduct> {
self.user_data().get()
}
}