seat: Use user-provided xkb-config
This commit is contained in:
parent
6966305ad4
commit
7708cdc1a2
4 changed files with 23 additions and 7 deletions
|
|
@ -373,6 +373,10 @@ impl Config {
|
|||
.insert(infos, configs);
|
||||
}
|
||||
|
||||
pub fn xkb_config(&self) -> XkbConfig {
|
||||
self.dynamic_conf.inputs().xkb.clone()
|
||||
}
|
||||
|
||||
pub fn read_device(&mut self, device: &mut InputDevice) {
|
||||
use std::collections::hash_map::Entry;
|
||||
|
||||
|
|
|
|||
|
|
@ -9,12 +9,12 @@ pub use smithay::{
|
|||
utils::{Logical, Physical, Point, Size, Transform},
|
||||
wayland::{
|
||||
output::{Mode, Output},
|
||||
seat::{keysyms as KeySyms, Keysym, ModifiersState as KeyModifiers},
|
||||
seat::{keysyms as KeySyms, Keysym, ModifiersState as KeyModifiers, XkbConfig as WlXkbConfig},
|
||||
},
|
||||
};
|
||||
use xkbcommon::xkb;
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
#[derive(Debug, Clone, Deserialize, Serialize)]
|
||||
pub struct XkbConfig {
|
||||
pub rules: String,
|
||||
pub model: String,
|
||||
|
|
@ -35,6 +35,18 @@ impl Default for XkbConfig {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> Into<WlXkbConfig<'a>> for &'a XkbConfig {
|
||||
fn into(self) -> WlXkbConfig<'a> {
|
||||
WlXkbConfig {
|
||||
rules: &self.rules,
|
||||
model: &self.model,
|
||||
layout: &self.layout,
|
||||
variant: &self.variant,
|
||||
options: self.options.clone(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub mod ClickMethodDef {
|
||||
use serde::{Deserialize, Deserializer, Serialize, Serializer};
|
||||
use smithay::reexports::input::ClickMethod as ClickMethodOrig;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue