head-management: add jay-tearing-mode-info-v1 extension
This commit is contained in:
parent
3e2707174e
commit
a7f8a26df7
11 changed files with 107 additions and 11 deletions
|
|
@ -1335,6 +1335,17 @@ impl OutputNode {
|
|||
.handle_vrr_mode_change(mode.to_config());
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_tearing_mode(&self, mode: &'static TearingMode) {
|
||||
let old = self.global.persistent.tearing_mode.replace(mode);
|
||||
if old != mode {
|
||||
self.update_presentation_type();
|
||||
self.global
|
||||
.connector
|
||||
.head_managers
|
||||
.handle_tearing_mode_change(mode.to_config());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct OutputTitle {
|
||||
|
|
@ -1785,13 +1796,13 @@ impl TearingMode {
|
|||
Some(res)
|
||||
}
|
||||
|
||||
pub fn to_config(&self) -> ConfigVrrMode {
|
||||
pub fn to_config(&self) -> ConfigTearingMode {
|
||||
match self {
|
||||
Self::NEVER => ConfigVrrMode::NEVER,
|
||||
Self::ALWAYS => ConfigVrrMode::ALWAYS,
|
||||
Self::VARIANT_1 => ConfigVrrMode::VARIANT_1,
|
||||
Self::VARIANT_2 => ConfigVrrMode::VARIANT_2,
|
||||
Self::VARIANT_3 => ConfigVrrMode::VARIANT_3,
|
||||
Self::NEVER => ConfigTearingMode::NEVER,
|
||||
Self::ALWAYS => ConfigTearingMode::ALWAYS,
|
||||
Self::VARIANT_1 => ConfigTearingMode::VARIANT_1,
|
||||
Self::VARIANT_2 => ConfigTearingMode::VARIANT_2,
|
||||
Self::VARIANT_3 => ConfigTearingMode::VARIANT_3,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue