chore: update dependencies
This commit is contained in:
parent
fec7c94605
commit
35d781dc1e
2 changed files with 100 additions and 79 deletions
|
|
@ -10,13 +10,13 @@ use crate::{
|
|||
};
|
||||
use cosmic_config::{ConfigGet, CosmicConfigEntry};
|
||||
use cosmic_settings_config::window_rules::ApplicationException;
|
||||
use cosmic_settings_config::{shortcuts, window_rules, Shortcuts};
|
||||
use cosmic_settings_config::{Shortcuts, shortcuts, window_rules};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use smithay::utils::{Clock, Monotonic};
|
||||
use smithay::wayland::xdg_activation::XdgActivationState;
|
||||
pub use smithay::{
|
||||
backend::input::{self as smithay_input, KeyState},
|
||||
input::keyboard::{keysyms as KeySyms, Keysym, ModifiersState},
|
||||
input::keyboard::{Keysym, ModifiersState, keysyms as KeySyms},
|
||||
output::{Mode, Output},
|
||||
reexports::{
|
||||
calloop::LoopHandle,
|
||||
|
|
@ -25,7 +25,7 @@ pub use smithay::{
|
|||
TapButtonMap,
|
||||
},
|
||||
},
|
||||
utils::{Logical, Physical, Point, Size, Transform, SERIAL_COUNTER},
|
||||
utils::{Logical, Physical, Point, SERIAL_COUNTER, Size, Transform},
|
||||
};
|
||||
use std::{
|
||||
cell::RefCell,
|
||||
|
|
@ -33,7 +33,7 @@ use std::{
|
|||
fs::OpenOptions,
|
||||
io::Write,
|
||||
path::PathBuf,
|
||||
sync::{atomic::AtomicBool, Arc},
|
||||
sync::{Arc, atomic::AtomicBool},
|
||||
};
|
||||
use tracing::{error, warn};
|
||||
|
||||
|
|
@ -45,8 +45,8 @@ pub use self::types::*;
|
|||
use cosmic::config::CosmicTk;
|
||||
pub use cosmic_comp_config::output::EdidProduct;
|
||||
use cosmic_comp_config::{
|
||||
input::InputConfig, workspace::WorkspaceConfig, CosmicCompConfig, KeyboardConfig, TileBehavior,
|
||||
XkbConfig, XwaylandDescaling, XwaylandEavesdropping, ZoomConfig,
|
||||
CosmicCompConfig, KeyboardConfig, TileBehavior, XkbConfig, XwaylandDescaling,
|
||||
XwaylandEavesdropping, ZoomConfig, input::InputConfig, workspace::WorkspaceConfig,
|
||||
};
|
||||
|
||||
#[derive(Debug)]
|
||||
|
|
@ -213,7 +213,7 @@ impl Config {
|
|||
config_changed(config, keys, state);
|
||||
})
|
||||
.expect("Failed to add cosmic-config to the event loop");
|
||||
let xdg = xdg::BaseDirectories::new().ok();
|
||||
let xdg = xdg::BaseDirectories::new();
|
||||
|
||||
let cosmic_comp_config =
|
||||
CosmicCompConfig::get_entry(&config).unwrap_or_else(|(errs, c)| {
|
||||
|
|
@ -341,7 +341,7 @@ impl Config {
|
|||
});
|
||||
|
||||
Config {
|
||||
dynamic_conf: Self::load_dynamic(xdg.as_ref()),
|
||||
dynamic_conf: Self::load_dynamic(&xdg),
|
||||
cosmic_conf: cosmic_comp_config,
|
||||
cosmic_helper: config,
|
||||
settings_context,
|
||||
|
|
@ -351,18 +351,15 @@ impl Config {
|
|||
}
|
||||
}
|
||||
|
||||
fn load_dynamic(xdg: Option<&xdg::BaseDirectories>) -> DynamicConfig {
|
||||
let output_path =
|
||||
xdg.and_then(|base| base.place_state_file("cosmic-comp/outputs.ron").ok());
|
||||
fn load_dynamic(xdg: &xdg::BaseDirectories) -> DynamicConfig {
|
||||
let output_path = xdg.place_state_file("cosmic-comp/outputs.ron").ok();
|
||||
let outputs = Self::load_outputs(&output_path);
|
||||
let numlock_path =
|
||||
xdg.and_then(|base| base.place_state_file("cosmic-comp/numlock.ron").ok());
|
||||
let numlock_path = xdg.place_state_file("cosmic-comp/numlock.ron").ok();
|
||||
let numlock = Self::load_numlock(&numlock_path);
|
||||
|
||||
let filter_path = xdg.and_then(|base| {
|
||||
base.place_state_file("cosmic-comp/a11y_screen_filter.ron")
|
||||
.ok()
|
||||
});
|
||||
let filter_path = xdg
|
||||
.place_state_file("cosmic-comp/a11y_screen_filter.ron")
|
||||
.ok();
|
||||
let filter = Self::load_filter_state(&filter_path);
|
||||
|
||||
DynamicConfig {
|
||||
|
|
@ -389,11 +386,15 @@ impl Config {
|
|||
.find(|(_, info)| &info.connector == conn)
|
||||
{
|
||||
if config_clone[j].enabled != OutputState::Enabled {
|
||||
warn!("Invalid Mirroring tag, overriding with `Enabled` instead");
|
||||
warn!(
|
||||
"Invalid Mirroring tag, overriding with `Enabled` instead"
|
||||
);
|
||||
conf.enabled = OutputState::Enabled;
|
||||
}
|
||||
} else {
|
||||
warn!("Invalid Mirroring tag, overriding with `Enabled` instead");
|
||||
warn!(
|
||||
"Invalid Mirroring tag, overriding with `Enabled` instead"
|
||||
);
|
||||
conf.enabled = OutputState::Enabled;
|
||||
}
|
||||
}
|
||||
|
|
@ -797,7 +798,7 @@ fn get_config<T: Default + serde::de::DeserializeOwned>(
|
|||
}
|
||||
|
||||
fn update_input(state: &mut State) {
|
||||
if let BackendData::Kms(ref mut kms_state) = &mut state.backend {
|
||||
if let BackendData::Kms(kms_state) = &mut state.backend {
|
||||
for device in kms_state.input_devices.values_mut() {
|
||||
state.common.config.read_device(device);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue