config: allow disabling explicit-sync
This commit is contained in:
parent
aaf73d6fdc
commit
aa296a6aea
12 changed files with 58 additions and 2 deletions
|
|
@ -289,6 +289,7 @@ pub struct Config {
|
|||
pub render_device: Option<DrmDeviceMatch>,
|
||||
pub inputs: Vec<Input>,
|
||||
pub idle: Option<Duration>,
|
||||
pub explicit_sync_enabled: Option<bool>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
|
|
|
|||
|
|
@ -95,6 +95,7 @@ impl Parser for ConfigParser<'_> {
|
|||
_,
|
||||
idle_val,
|
||||
),
|
||||
(explicit_sync,),
|
||||
) = ext.extract((
|
||||
(
|
||||
opt(val("keymap")),
|
||||
|
|
@ -120,6 +121,7 @@ impl Parser for ConfigParser<'_> {
|
|||
opt(val("$schema")),
|
||||
opt(val("idle")),
|
||||
),
|
||||
(recover(opt(bol("explicit-sync"))),),
|
||||
))?;
|
||||
let mut keymap = None;
|
||||
if let Some(value) = keymap_val {
|
||||
|
|
@ -271,6 +273,7 @@ impl Parser for ConfigParser<'_> {
|
|||
gfx_api,
|
||||
drm_devices,
|
||||
direct_scanout_enabled: direct_scanout.despan(),
|
||||
explicit_sync_enabled: explicit_sync.despan(),
|
||||
render_device,
|
||||
inputs,
|
||||
idle,
|
||||
|
|
|
|||
|
|
@ -19,7 +19,8 @@ use {
|
|||
is_reload,
|
||||
keyboard::{Keymap, ModifiedKeySym},
|
||||
logging::set_log_level,
|
||||
on_devices_enumerated, on_idle, quit, reload, set_default_workspace_capture, set_idle,
|
||||
on_devices_enumerated, on_idle, quit, reload, set_default_workspace_capture,
|
||||
set_explicit_sync_enabled, set_idle,
|
||||
status::{set_i3bar_separator, set_status, set_status_command, unset_status_command},
|
||||
switch_to_vt,
|
||||
theme::{reset_colors, reset_font, reset_sizes, set_font},
|
||||
|
|
@ -789,6 +790,9 @@ fn load_config(initial_load: bool, persistent: &Rc<PersistentState>) {
|
|||
if let Some(dse) = config.direct_scanout_enabled {
|
||||
set_direct_scanout_enabled(dse);
|
||||
}
|
||||
if let Some(ese) = config.explicit_sync_enabled {
|
||||
set_explicit_sync_enabled(ese);
|
||||
}
|
||||
on_new_drm_device({
|
||||
let state = state.clone();
|
||||
move |d| {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue