head-management: handle additional properties
This commit is contained in:
parent
cbe190274e
commit
da01d7e0d3
5 changed files with 44 additions and 4 deletions
|
|
@ -7,9 +7,12 @@ use {
|
|||
client::ClientId,
|
||||
format::Format,
|
||||
globals::GlobalName,
|
||||
ifs::head_management::{
|
||||
head_management_macros::HeadExts, jay_head_manager_session_v1::JayHeadManagerSessionV1,
|
||||
jay_head_v1::JayHeadV1,
|
||||
ifs::{
|
||||
head_management::{
|
||||
head_management_macros::HeadExts,
|
||||
jay_head_manager_session_v1::JayHeadManagerSessionV1, jay_head_v1::JayHeadV1,
|
||||
},
|
||||
wl_output::BlendSpace,
|
||||
},
|
||||
scale::Scale,
|
||||
state::OutputData,
|
||||
|
|
@ -92,6 +95,9 @@ pub struct HeadState {
|
|||
pub eotf: BackendEotfs,
|
||||
pub supported_formats: RcEq<Vec<&'static Format>>,
|
||||
pub brightness: Option<f64>,
|
||||
pub blend_space: BlendSpace,
|
||||
pub use_native_gamut: bool,
|
||||
pub vrr_cursor_hz: Option<f64>,
|
||||
}
|
||||
|
||||
pub struct ReadOnlyHeadState {
|
||||
|
|
@ -258,6 +264,10 @@ impl HeadManagers {
|
|||
state.transform = n.global.persistent.transform.get();
|
||||
state.vrr_mode = n.global.persistent.vrr_mode.get();
|
||||
state.tearing_mode = n.global.persistent.tearing_mode.get();
|
||||
state.brightness = n.global.persistent.brightness.get();
|
||||
state.blend_space = n.global.persistent.blend_space.get();
|
||||
state.use_native_gamut = n.global.persistent.use_native_gamut.get();
|
||||
state.vrr_cursor_hz = n.global.persistent.vrr_cursor_hz.get();
|
||||
}
|
||||
for head in self.managers.lock().values() {
|
||||
skip_in_transaction!(head);
|
||||
|
|
@ -548,4 +558,19 @@ impl HeadManagers {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn handle_blend_space_change(&self, blend_space: BlendSpace) {
|
||||
let state = &mut *self.state.borrow_mut();
|
||||
state.blend_space = blend_space;
|
||||
}
|
||||
|
||||
pub fn handle_use_native_gamut_change(&self, use_native_gamut: bool) {
|
||||
let state = &mut *self.state.borrow_mut();
|
||||
state.use_native_gamut = use_native_gamut;
|
||||
}
|
||||
|
||||
pub fn handle_cursor_hz_change(&self, cursor_hz: Option<f64>) {
|
||||
let state = &mut *self.state.borrow_mut();
|
||||
state.vrr_cursor_hz = cursor_hz;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue